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 dee98fccb83f..b579f9d6d183 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,498 +1,498 @@ namespace Azure.ResourceManager.MachineLearning { - public partial class BatchDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class MachineLearningBatchDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected BatchDeploymentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.BatchDeploymentData 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.BatchDeploymentData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected MachineLearningBatchDeploymentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentData 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.MachineLearningBatchDeploymentData 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(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, 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; } - 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; } + public virtual Azure.Response Get(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, 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; } + 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 BatchDeploymentData : Azure.ResourceManager.Models.TrackedResourceData + public partial class MachineLearningBatchDeploymentData : Azure.ResourceManager.Models.TrackedResourceData { - public BatchDeploymentData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.BatchDeploymentProperties properties) : base (default(Azure.Core.AzureLocation)) { } + public MachineLearningBatchDeploymentData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties properties) : base (default(Azure.Core.AzureLocation)) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string Kind { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.BatchDeploymentProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } } - public partial class BatchDeploymentResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningBatchDeploymentResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected BatchDeploymentResource() { } - public virtual Azure.ResourceManager.MachineLearning.BatchDeploymentData Data { get { throw null; } } + protected MachineLearningBatchDeploymentResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.BatchDeploymentPatch 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.BatchDeploymentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class BatchEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected BatchEndpointCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.MachineLearning.BatchEndpointData 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.BatchEndpointData data, 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 RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchDeploymentPatch 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.MachineLearningBatchDeploymentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningBatchEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningBatchEndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointData 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.MachineLearningBatchEndpointData 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(int? count = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(int? count = default(int?), string skip = 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; } - 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; } + public virtual Azure.Response Get(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(int? count = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(int? count = default(int?), string skip = 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; } + 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 BatchEndpointData : Azure.ResourceManager.Models.TrackedResourceData + public partial class MachineLearningBatchEndpointData : Azure.ResourceManager.Models.TrackedResourceData { - public BatchEndpointData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.BatchEndpointProperties properties) : base (default(Azure.Core.AzureLocation)) { } + public MachineLearningBatchEndpointData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties properties) : base (default(Azure.Core.AzureLocation)) { } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string Kind { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.BatchEndpointProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchEndpointProperties Properties { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } } - public partial class BatchEndpointResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningBatchEndpointResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected BatchEndpointResource() { } - public virtual Azure.ResourceManager.MachineLearning.BatchEndpointData Data { get { throw null; } } + protected MachineLearningBatchEndpointResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) { 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; } - public virtual Azure.Response GetBatchDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBatchDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.BatchDeploymentCollection GetBatchDeployments() { 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 RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.PartialMinimalTrackedResourceWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.PartialMinimalTrackedResourceWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class CodeContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CodeContainerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.CodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.CodeContainerData data, 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 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 GetMachineLearningBatchDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningBatchDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningBatchDeploymentCollection GetMachineLearningBatchDeployments() { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatchWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatchWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningCodeContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningCodeContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 name, 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; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 name, 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 CodeContainerData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningCodeContainerData : Azure.ResourceManager.Models.ResourceData { - public CodeContainerData(Azure.ResourceManager.MachineLearning.Models.CodeContainerProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.CodeContainerProperties Properties { get { throw null; } set { } } + public MachineLearningCodeContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeContainerProperties Properties { get { throw null; } set { } } } - public partial class CodeContainerResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningCodeContainerResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected CodeContainerResource() { } - public virtual Azure.ResourceManager.MachineLearning.CodeContainerData Data { get { throw null; } } + protected MachineLearningCodeContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - public virtual Azure.Response GetCodeVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCodeVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.CodeVersionCollection GetCodeVersions() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.CodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.CodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class CodeVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected CodeVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.CodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.CodeVersionData data, 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 GetMachineLearningCodeVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningCodeVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionCollection GetMachineLearningCodeVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningCodeVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningCodeVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string version, 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; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, 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 CodeVersionData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningCodeVersionData : Azure.ResourceManager.Models.ResourceData { - public CodeVersionData(Azure.ResourceManager.MachineLearning.Models.CodeVersionProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.CodeVersionProperties Properties { get { throw null; } set { } } + public MachineLearningCodeVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeVersionProperties Properties { get { throw null; } set { } } } - public partial class CodeVersionResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningCodeVersionResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected CodeVersionResource() { } - public virtual Azure.ResourceManager.MachineLearning.CodeVersionData Data { get { throw null; } } + protected MachineLearningCodeVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.CodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.CodeVersionData data, 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class ComponentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class MachineLearningComponentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected ComponentContainerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.ComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.ComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected MachineLearningComponentContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string name, 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; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 ComponentContainerData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningComponentContainerData : Azure.ResourceManager.Models.ResourceData { - public ComponentContainerData(Azure.ResourceManager.MachineLearning.Models.ComponentContainerProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.ComponentContainerProperties Properties { get { throw null; } set { } } + public MachineLearningComponentContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentContainerProperties Properties { get { throw null; } set { } } } - public partial class ComponentContainerResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningComponentContainerResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected ComponentContainerResource() { } - public virtual Azure.ResourceManager.MachineLearning.ComponentContainerData Data { get { throw null; } } + protected MachineLearningComponentContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - public virtual Azure.Response GetComponentVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetComponentVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.ComponentVersionCollection GetComponentVersions() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ComponentVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ComponentVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.ComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.ComponentVersionData data, 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 GetMachineLearningComponentVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningComponentVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionCollection GetMachineLearningComponentVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningComponentVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningComponentVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string version, 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; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, 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 ComponentVersionData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningComponentVersionData : Azure.ResourceManager.Models.ResourceData { - public ComponentVersionData(Azure.ResourceManager.MachineLearning.Models.ComponentVersionProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.ComponentVersionProperties Properties { get { throw null; } set { } } + public MachineLearningComponentVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComponentVersionProperties Properties { get { throw null; } set { } } } - public partial class ComponentVersionResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningComponentVersionResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected ComponentVersionResource() { } - public virtual Azure.ResourceManager.MachineLearning.ComponentVersionData Data { get { throw null; } } + protected MachineLearningComponentVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ComponentVersionData data, 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class DataContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class MachineLearningComputeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningComputeCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.MachineLearning.MachineLearningComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.MachineLearning.MachineLearningComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 computeName, 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 MachineLearningComputeData : Azure.ResourceManager.Models.TrackedResourceData + { + public MachineLearningComputeData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + } + public partial class MachineLearningComputeResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningComputeResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComputeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) { throw null; } + 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 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 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; } + public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 partial class MachineLearningDataContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected DataContainerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.DataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.DataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected MachineLearningDataContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string name, 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; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 DataContainerData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningDataContainerData : Azure.ResourceManager.Models.ResourceData { - public DataContainerData(Azure.ResourceManager.MachineLearning.Models.DataContainerProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.DataContainerProperties Properties { get { throw null; } set { } } + public MachineLearningDataContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDataContainerProperties Properties { get { throw null; } set { } } } - public partial class DataContainerResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningDataContainerResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected DataContainerResource() { } - public virtual Azure.ResourceManager.MachineLearning.DataContainerData Data { get { throw null; } } + protected MachineLearningDataContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - public virtual Azure.Response GetDataVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDataVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.DataVersionCollection GetDataVersions() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DatastoreCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DatastoreCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.DatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.DatastoreData data, bool? skipValidation = default(bool?), 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 GetMachineLearningDataVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningDataVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDataVersionCollection GetMachineLearningDataVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningDatastoreCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningDatastoreCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, int? count = default(int?), bool? isDefault = default(bool?), System.Collections.Generic.IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, int? count = default(int?), bool? isDefault = default(bool?), System.Collections.Generic.IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string name, 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; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, int? count = default(int?), bool? isDefault = default(bool?), System.Collections.Generic.IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, int? count = default(int?), bool? isDefault = default(bool?), System.Collections.Generic.IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 DatastoreData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningDatastoreData : Azure.ResourceManager.Models.ResourceData { - public DatastoreData(Azure.ResourceManager.MachineLearning.Models.DatastoreProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.DatastoreProperties Properties { get { throw null; } set { } } + public MachineLearningDatastoreData(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties Properties { get { throw null; } set { } } } - public partial class DatastoreResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningDatastoreResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected DatastoreResource() { } - public virtual Azure.ResourceManager.MachineLearning.DatastoreData Data { get { throw null; } } + protected MachineLearningDatastoreResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class DataVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected DataVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.DataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.DataVersionData data, 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(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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDatastoreData data, bool? skipValidation = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningDataVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningDataVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string version, 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; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, string tags = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, 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 DataVersionData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningDataVersionData : Azure.ResourceManager.Models.ResourceData { - public DataVersionData(Azure.ResourceManager.MachineLearning.Models.DataVersionProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.DataVersionProperties Properties { get { throw null; } set { } } + public MachineLearningDataVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties Properties { get { throw null; } set { } } } - public partial class DataVersionResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningDataVersionResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected DataVersionResource() { } - public virtual Azure.ResourceManager.MachineLearning.DataVersionData Data { get { throw null; } } + protected MachineLearningDataVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.DataVersionData data, 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningDataVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class EnvironmentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class MachineLearningEnvironmentContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { - protected EnvironmentContainerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.EnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.EnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + protected MachineLearningEnvironmentContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string name, 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; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 EnvironmentContainerData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningEnvironmentContainerData : Azure.ResourceManager.Models.ResourceData { - public EnvironmentContainerData(Azure.ResourceManager.MachineLearning.Models.EnvironmentContainerProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.EnvironmentContainerProperties Properties { get { throw null; } set { } } + public MachineLearningEnvironmentContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentContainerProperties Properties { get { throw null; } set { } } } - public partial class EnvironmentContainerResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningEnvironmentContainerResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected EnvironmentContainerResource() { } - public virtual Azure.ResourceManager.MachineLearning.EnvironmentContainerData Data { get { throw null; } } + protected MachineLearningEnvironmentContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - public virtual Azure.Response GetEnvironmentVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetEnvironmentVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.EnvironmentVersionCollection GetEnvironmentVersions() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class EnvironmentVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected EnvironmentVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.EnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.EnvironmentVersionData data, 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 GetMachineLearningEnvironmentVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningEnvironmentVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionCollection GetMachineLearningEnvironmentVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningEnvironmentVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningEnvironmentVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string version, 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; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, 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 EnvironmentVersionData : Azure.ResourceManager.Models.ResourceData + public partial class MachineLearningEnvironmentVersionData : Azure.ResourceManager.Models.ResourceData { - public EnvironmentVersionData(Azure.ResourceManager.MachineLearning.Models.EnvironmentVersionProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.EnvironmentVersionProperties Properties { get { throw null; } set { } } + public MachineLearningEnvironmentVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentVersionProperties Properties { get { throw null; } set { } } } - public partial class EnvironmentVersionResource : Azure.ResourceManager.ArmResource + public partial class MachineLearningEnvironmentVersionResource : Azure.ResourceManager.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected EnvironmentVersionResource() { } - public virtual Azure.ResourceManager.MachineLearning.EnvironmentVersionData Data { get { throw null; } } + protected MachineLearningEnvironmentVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.EnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class MachineLearningComputeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected MachineLearningComputeCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.MachineLearning.MachineLearningComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string computeName, Azure.ResourceManager.MachineLearning.MachineLearningComputeData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.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 computeName, 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 MachineLearningComputeData : Azure.ResourceManager.Models.TrackedResourceData - { - public MachineLearningComputeData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.Compute Properties { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } - } - public partial class MachineLearningComputeResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected MachineLearningComputeResource() { } - public virtual Azure.ResourceManager.MachineLearning.MachineLearningComputeData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string computeName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction 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.UnderlyingResourceAction 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 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 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; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Stop(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StopAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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 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.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public static partial class MachineLearningExtensions { - public static Azure.Pageable GetAllQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetAllQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.MachineLearning.BatchDeploymentResource GetBatchDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.BatchEndpointResource GetBatchEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.CodeContainerResource GetCodeContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.CodeVersionResource GetCodeVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.ComponentContainerResource GetComponentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.ComponentVersionResource GetComponentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.DataContainerResource GetDataContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.DatastoreResource GetDatastoreResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.DataVersionResource GetDataVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.EnvironmentContainerResource GetEnvironmentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.EnvironmentVersionResource GetEnvironmentVersionResource(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; } + public static Azure.ResourceManager.MachineLearning.MachineLearningCodeVersionResource GetMachineLearningCodeVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerResource GetMachineLearningComponentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningComponentVersionResource GetMachineLearningComponentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningComputeResource GetMachineLearningComputeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningDataContainerResource GetMachineLearningDataContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningDatastoreResource GetMachineLearningDatastoreResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningDataVersionResource GetMachineLearningDataVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerResource GetMachineLearningEnvironmentContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentVersionResource GetMachineLearningEnvironmentVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningJobResource GetMachineLearningJobResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningModelContainerResource GetMachineLearningModelContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningModelVersionResource GetMachineLearningModelVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentResource GetMachineLearningOnlineDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointResource GetMachineLearningOnlineEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionResource GetMachineLearningPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetMachineLearningQuotas(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMachineLearningQuotasAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.MachineLearning.MachineLearningScheduleResource GetMachineLearningScheduleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Pageable GetMachineLearningUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMachineLearningUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetMachineLearningVmSizes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMachineLearningVmSizesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetMachineLearningWorkspace(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetMachineLearningWorkspaceAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string workspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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 skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetMachineLearningWorkspacesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.MachineLearning.ModelContainerResource GetModelContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.ModelVersionResource GetModelVersionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.OnlineDeploymentResource GetOnlineDeploymentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.OnlineEndpointResource GetOnlineEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.MachineLearning.ScheduleResource GetScheduleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable GetUsages(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetUsagesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Pageable GetVirtualMachineSizes(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetVirtualMachineSizesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResource GetWorkspaceConnectionPropertiesV2BasicResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.Pageable UpdateAllQuota(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.QuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable UpdateAllQuotaAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.QuotaUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } } public partial class MachineLearningJobCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -502,8 +502,8 @@ protected MachineLearningJobCollection() { } public virtual Azure.Response Exists(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, string jobType = null, string tag = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string jobType = null, string tag = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, string jobType = null, string tag = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string jobType = null, string tag = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(string id, 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; } @@ -530,6 +530,176 @@ protected MachineLearningJobResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningJobData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MachineLearningModelContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningModelContainerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 MachineLearningModelContainerData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningModelContainerData(Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningModelContainerProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningModelContainerResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningModelContainerResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } + public virtual Azure.Response GetMachineLearningModelVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningModelVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelVersionCollection GetMachineLearningModelVersions() { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningModelVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningModelVersionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, string orderBy = null, int? top = default(int?), string version = null, string description = null, int? offset = default(int?), string tags = null, string properties = null, string feed = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string orderBy = null, int? top = default(int?), string version = null, string description = null, int? offset = default(int?), string tags = null, string properties = null, string feed = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string version, 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 MachineLearningModelVersionData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningModelVersionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningModelVersionProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningModelVersionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningModelVersionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { 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; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningOnlineDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningOnlineDeploymentCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentData 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.MachineLearningOnlineDeploymentData 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(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, 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; } + 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 MachineLearningOnlineDeploymentData : Azure.ResourceManager.Models.TrackedResourceData + { + public MachineLearningOnlineDeploymentData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties properties) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + } + public partial class MachineLearningOnlineDeploymentResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningOnlineDeploymentResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } + public virtual Azure.Response GetLogs(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentLogsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetLogsAsync(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentLogsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSkus(int? count = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSkusAsync(int? count = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentPatch 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.MachineLearningOnlineDeploymentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MachineLearningOnlineEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningOnlineEndpointCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointData 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.MachineLearningOnlineEndpointData 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(string name = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType? computeType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType?), string skip = null, string tags = null, string properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString? orderBy = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string name = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType? computeType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType?), string skip = null, string tags = null, string properties = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString? orderBy = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString?), 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; } + 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 MachineLearningOnlineEndpointData : Azure.ResourceManager.Models.TrackedResourceData + { + public MachineLearningOnlineEndpointData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties properties) : base (default(Azure.Core.AzureLocation)) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public string Kind { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineEndpointProperties Properties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + } + public partial class MachineLearningOnlineEndpointResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningOnlineEndpointResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) { 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; } + 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 GetMachineLearningOnlineDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningOnlineDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningOnlineDeploymentCollection GetMachineLearningOnlineDeployments() { throw null; } + public virtual Azure.Response GetToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RegenerateKeys(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointKeyRegenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RegenerateKeysAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointKeyRegenerateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatchWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatchWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class MachineLearningPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MachineLearningPrivateEndpointConnectionCollection() { } @@ -550,7 +720,7 @@ public partial class MachineLearningPrivateEndpointConnectionData : Azure.Resour public MachineLearningPrivateEndpointConnectionData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } 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.PrivateEndpoint PrivateEndpoint { 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; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } } @@ -574,6 +744,40 @@ protected MachineLearningPrivateEndpointConnectionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class MachineLearningScheduleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningScheduleCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.MachineLearningScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 MachineLearningScheduleData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningScheduleData(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningScheduleResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningScheduleResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningScheduleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class MachineLearningWorkspaceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected MachineLearningWorkspaceCollection() { } @@ -589,6 +793,40 @@ protected MachineLearningWorkspaceCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } + public partial class MachineLearningWorkspaceConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MachineLearningWorkspaceConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string connectionName, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectionName, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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, 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; } + 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 MachineLearningWorkspaceConnectionData : Azure.ResourceManager.Models.ResourceData + { + public MachineLearningWorkspaceConnectionData(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties properties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningWorkspaceConnectionResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MachineLearningWorkspaceConnectionResource() { } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData 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) { 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; } + 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.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class MachineLearningWorkspaceData : Azure.ResourceManager.Models.TrackedResourceData { public MachineLearningWorkspaceData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } @@ -598,26 +836,26 @@ public MachineLearningWorkspaceData(Azure.Core.AzureLocation location) : base (d public int? CosmosDbCollectionsThroughput { get { throw null; } set { } } public string Description { get { throw null; } set { } } public System.Uri DiscoveryUri { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EncryptionProperty Encryption { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionSetting Encryption { get { throw null; } set { } } public string FriendlyName { get { throw null; } set { } } public bool? HbiWorkspace { get { throw null; } set { } } public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } public string ImageBuildCompute { 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.Uri MlFlowTrackingUri { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.NotebookResourceInfo NotebookInfo { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookResourceInfo NotebookInfo { get { throw null; } } public string PrimaryUserAssignedIdentity { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } public int? PrivateLinkCount { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } public string ServiceProvisionedResourceGroup { get { throw null; } } - public System.Collections.Generic.IList SharedPrivateLinkResources { get { throw null; } } + public System.Collections.Generic.IList SharedPrivateLinkResources { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } public string StorageAccount { get { throw null; } set { } } - public bool? StorageHnsEnabled { get { throw null; } } public System.Guid? TenantId { get { throw null; } } - public bool? V1LegacyMode { get { throw null; } set { } } public string WorkspaceId { get { throw null; } } } public partial class MachineLearningWorkspaceResource : Azure.ResourceManager.ArmResource @@ -631,65 +869,65 @@ protected MachineLearningWorkspaceResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName) { 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 Diagnose(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.DiagnoseWorkspaceContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DiagnoseAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.DiagnoseWorkspaceContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Diagnose(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + 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 GetBatchEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetBatchEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.BatchEndpointCollection GetBatchEndpoints() { throw null; } - public virtual Azure.Response GetCodeContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetCodeContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.CodeContainerCollection GetCodeContainers() { throw null; } - public virtual Azure.Response GetComponentContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetComponentContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.ComponentContainerCollection GetComponentContainers() { throw null; } - public virtual Azure.Response GetDataContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDataContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.DataContainerCollection GetDataContainers() { throw null; } - public virtual Azure.Response GetDatastore(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDatastoreAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.DatastoreCollection GetDatastores() { throw null; } - public virtual Azure.Response GetEnvironmentContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetEnvironmentContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.EnvironmentContainerCollection GetEnvironmentContainers() { 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 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; } + public virtual System.Threading.Tasks.Task> GetMachineLearningBatchEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningBatchEndpointCollection GetMachineLearningBatchEndpoints() { throw null; } + public virtual Azure.Response GetMachineLearningCodeContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningCodeContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningCodeContainerCollection GetMachineLearningCodeContainers() { throw null; } + public virtual Azure.Response GetMachineLearningComponentContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningComponentContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningComponentContainerCollection GetMachineLearningComponentContainers() { throw null; } public virtual Azure.Response GetMachineLearningCompute(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningComputeAsync(string computeName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningComputeCollection GetMachineLearningComputes() { throw null; } + public virtual Azure.Response GetMachineLearningDataContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningDataContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDataContainerCollection GetMachineLearningDataContainers() { throw null; } + public virtual Azure.Response GetMachineLearningDatastore(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningDatastoreAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningDatastoreCollection GetMachineLearningDatastores() { throw null; } + public virtual Azure.Response GetMachineLearningEnvironmentContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningEnvironmentContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningEnvironmentContainerCollection GetMachineLearningEnvironmentContainers() { throw null; } public virtual Azure.Response GetMachineLearningJob(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningJobAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningJobCollection GetMachineLearningJobs() { throw null; } + public virtual Azure.Response GetMachineLearningModelContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningModelContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningModelContainerCollection GetMachineLearningModelContainers() { throw null; } + public virtual Azure.Response GetMachineLearningOnlineEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningOnlineEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningOnlineEndpointCollection GetMachineLearningOnlineEndpoints() { throw null; } public virtual Azure.Response GetMachineLearningPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetMachineLearningPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.MachineLearning.MachineLearningPrivateEndpointConnectionCollection GetMachineLearningPrivateEndpointConnections() { throw null; } - public virtual Azure.Response GetModelContainer(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetModelContainerAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.ModelContainerCollection GetModelContainers() { 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; } - public virtual System.Threading.Tasks.Task> GetNotebookKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetOnlineEndpoint(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetOnlineEndpointAsync(string endpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.OnlineEndpointCollection GetOnlineEndpoints() { throw null; } - public virtual Azure.Pageable GetOutboundNetworkDependenciesEndpoints(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetMachineLearningSchedule(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningScheduleAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningScheduleCollection GetMachineLearningSchedules() { throw null; } + public virtual Azure.Response GetMachineLearningWorkspaceConnection(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMachineLearningWorkspaceConnectionAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MachineLearning.MachineLearningWorkspaceConnectionCollection GetMachineLearningWorkspaceConnections() { 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; } + public virtual System.Threading.Tasks.Task> GetNotebookKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetOutboundNetworkDependenciesEndpoints(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetPrivateLinkResources(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPrivateLinkResourcesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSchedule(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetScheduleAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.ScheduleCollection GetSchedules() { throw null; } - public virtual Azure.Response GetStorageAccountKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetStorageAccountKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkspaceConnectionPropertiesV2BasicResource(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceConnectionPropertiesV2BasicResourceAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResourceCollection GetWorkspaceConnectionPropertiesV2BasicResources() { throw null; } - public virtual Azure.Pageable GetWorkspaceFeatures(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetWorkspaceFeaturesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation PrepareNotebook(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> PrepareNotebookAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetStorageAccountKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetStorageAccountKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetWorkspaceFeatures(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetWorkspaceFeaturesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PrepareNotebook(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PrepareNotebookAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation ResyncKeys(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -699,426 +937,159 @@ protected MachineLearningWorkspaceResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspacePatch 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.MachineLearningWorkspacePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class ModelContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ModelContainerCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.ModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.ModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string name, 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 ModelContainerData : Azure.ResourceManager.Models.ResourceData +} +namespace Azure.ResourceManager.MachineLearning.Models +{ + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AmlAllocationState : System.IEquatable { - public ModelContainerData(Azure.ResourceManager.MachineLearning.Models.ModelContainerProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.ModelContainerProperties Properties { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AmlAllocationState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AmlAllocationState Resizing { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AmlAllocationState Steady { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.AmlAllocationState 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.AmlAllocationState left, Azure.ResourceManager.MachineLearning.Models.AmlAllocationState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.AmlAllocationState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AmlAllocationState left, Azure.ResourceManager.MachineLearning.Models.AmlAllocationState right) { throw null; } + public override string ToString() { throw null; } } - public partial class ModelContainerResource : Azure.ResourceManager.ArmResource + public partial class AmlCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public static readonly Azure.Core.ResourceType ResourceType; - protected ModelContainerResource() { } - public virtual Azure.ResourceManager.MachineLearning.ModelContainerData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - public virtual Azure.Response GetModelVersion(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetModelVersionAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.ModelVersionCollection GetModelVersions() { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ModelContainerData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ModelVersionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ModelVersionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.ModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string version, Azure.ResourceManager.MachineLearning.ModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, string orderBy = null, int? top = default(int?), string version = null, string description = null, int? offset = default(int?), string tags = null, string properties = null, string feed = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, string orderBy = null, int? top = default(int?), string version = null, string description = null, int? offset = default(int?), string tags = null, string properties = null, string feed = null, Azure.ResourceManager.MachineLearning.Models.ListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string version, 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 AmlCompute() { } + public Azure.ResourceManager.MachineLearning.Models.AmlComputeProperties Properties { get { throw null; } set { } } } - public partial class ModelVersionData : Azure.ResourceManager.Models.ResourceData + public partial class AmlComputeNodeInformation { - public ModelVersionData(Azure.ResourceManager.MachineLearning.Models.ModelVersionProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.ModelVersionProperties Properties { get { throw null; } set { } } + internal AmlComputeNodeInformation() { } + public string NodeId { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState? NodeState { get { throw null; } } + public int? Port { get { throw null; } } + public string PrivateIPAddress { get { throw null; } } + public string PublicIPAddress { get { throw null; } } + public string RunId { get { throw null; } } } - public partial class ModelVersionResource : Azure.ResourceManager.ArmResource + public partial class AmlComputeProperties { - public static readonly Azure.Core.ResourceType ResourceType; - protected ModelVersionResource() { } - public virtual Azure.ResourceManager.MachineLearning.ModelVersionData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ModelVersionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public AmlComputeProperties() { } + public Azure.ResourceManager.MachineLearning.Models.AmlAllocationState? AllocationState { get { throw null; } } + public System.DateTimeOffset? AllocationStateTransitionOn { get { throw null; } } + public int? CurrentNodeCount { get { throw null; } } + public bool? EnableNodePublicIP { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public bool? IsolatedNetwork { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeStateCounts NodeStateCounts { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType? OSType { get { throw null; } set { } } + public System.BinaryData PropertyBag { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess? RemoteLoginPortPublicAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AmlComputeScaleSettings ScaleSettings { get { throw null; } set { } } + public string SubnetId { get { throw null; } set { } } + public int? TargetNodeCount { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningUserAccountCredentials UserAccountCredentials { get { throw null; } set { } } + public string VirtualMachineImageId { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority? VmPriority { get { throw null; } set { } } + public string VmSize { get { throw null; } set { } } } - public partial class OnlineDeploymentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + public partial class AmlComputeScaleSettings { - protected OnlineDeploymentCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string deploymentName, Azure.ResourceManager.MachineLearning.OnlineDeploymentData 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.OnlineDeploymentData 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(string orderBy = null, int? top = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string orderBy = null, int? top = default(int?), string skip = null, 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; } - 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 AmlComputeScaleSettings(int maxNodeCount) { } + public int MaxNodeCount { get { throw null; } set { } } + public int? MinNodeCount { get { throw null; } set { } } + public System.TimeSpan? NodeIdleTimeBeforeScaleDown { get { throw null; } set { } } } - public partial class OnlineDeploymentData : Azure.ResourceManager.Models.TrackedResourceData + public partial class AmlToken : Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration { - public OnlineDeploymentData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.OnlineDeploymentProperties properties) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public string Kind { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.OnlineDeploymentProperties Properties { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + public AmlToken() { } } - public partial class OnlineDeploymentResource : Azure.ResourceManager.ArmResource + public partial class AutoForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon { - public static readonly Azure.Core.ResourceType ResourceType; - protected OnlineDeploymentResource() { } - public virtual Azure.ResourceManager.MachineLearning.OnlineDeploymentData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - public virtual Azure.Response GetLogs(Azure.ResourceManager.MachineLearning.Models.DeploymentLogsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetLogsAsync(Azure.ResourceManager.MachineLearning.Models.DeploymentLogsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetSkus(int? count = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSkusAsync(int? count = default(int?), string skip = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.OnlineDeploymentPatch 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.OnlineDeploymentPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class OnlineEndpointCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected OnlineEndpointCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string endpointName, Azure.ResourceManager.MachineLearning.OnlineEndpointData 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.OnlineEndpointData 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(string name = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.EndpointComputeType? computeType = default(Azure.ResourceManager.MachineLearning.Models.EndpointComputeType?), string skip = null, string tags = null, string properties = null, Azure.ResourceManager.MachineLearning.Models.OrderString? orderBy = default(Azure.ResourceManager.MachineLearning.Models.OrderString?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string name = null, int? count = default(int?), Azure.ResourceManager.MachineLearning.Models.EndpointComputeType? computeType = default(Azure.ResourceManager.MachineLearning.Models.EndpointComputeType?), string skip = null, string tags = null, string properties = null, Azure.ResourceManager.MachineLearning.Models.OrderString? orderBy = default(Azure.ResourceManager.MachineLearning.Models.OrderString?), 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; } - 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 AutoForecastHorizon() { } } - public partial class OnlineEndpointData : Azure.ResourceManager.Models.TrackedResourceData + public partial class AutoMLJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties { - public OnlineEndpointData(Azure.Core.AzureLocation location, Azure.ResourceManager.MachineLearning.Models.OnlineEndpointProperties properties) : base (default(Azure.Core.AzureLocation)) { } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public string Kind { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.OnlineEndpointProperties Properties { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + public AutoMLJob(Azure.ResourceManager.MachineLearning.Models.AutoMLVertical taskDetails) { } + public string EnvironmentId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration Resources { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoMLVertical TaskDetails { get { throw null; } set { } } } - public partial class OnlineEndpointResource : Azure.ResourceManager.ArmResource + public abstract partial class AutoMLVertical { - public static readonly Azure.Core.ResourceType ResourceType; - protected OnlineEndpointResource() { } - public virtual Azure.ResourceManager.MachineLearning.OnlineEndpointData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) { 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; } - 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 GetOnlineDeployment(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetOnlineDeploymentAsync(string deploymentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.MachineLearning.OnlineDeploymentCollection GetOnlineDeployments() { throw null; } - public virtual Azure.Response GetToken(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetTokenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RegenerateKeys(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.RegenerateEndpointKeysContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RegenerateKeysAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.RegenerateEndpointKeysContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.PartialMinimalTrackedResourceWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.Models.PartialMinimalTrackedResourceWithIdentity body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class ScheduleCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected ScheduleCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.ScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string name, Azure.ResourceManager.MachineLearning.ScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(string skip = null, Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(string skip = null, Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType? listViewType = default(Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string name, 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; } + protected AutoMLVertical(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity? LogVerbosity { get { throw null; } set { } } + public string TargetColumnName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TrainingData { get { throw null; } set { } } } - public partial class ScheduleData : Azure.ResourceManager.Models.ResourceData + public partial class AutoMLVerticalRegression : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { - public ScheduleData(Azure.ResourceManager.MachineLearning.Models.ScheduleProperties properties) { } - public Azure.ResourceManager.MachineLearning.Models.ScheduleProperties Properties { get { throw null; } set { } } - } - public partial class ScheduleResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected ScheduleResource() { } - public virtual Azure.ResourceManager.MachineLearning.ScheduleData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.ScheduleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class WorkspaceConnectionPropertiesV2BasicResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected WorkspaceConnectionPropertiesV2BasicResource() { } - public virtual Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResourceData 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) { 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; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class WorkspaceConnectionPropertiesV2BasicResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected WorkspaceConnectionPropertiesV2BasicResourceCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string connectionName, Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string connectionName, Azure.ResourceManager.MachineLearning.WorkspaceConnectionPropertiesV2BasicResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - 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, 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; } - 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 WorkspaceConnectionPropertiesV2BasicResourceData : Azure.ResourceManager.Models.ResourceData - { - public WorkspaceConnectionPropertiesV2BasicResourceData(Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 properties) { } - public Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 Properties { get { throw null; } set { } } - } -} -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AccountKeyDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials - { - public AccountKeyDatastoreCredentials(Azure.ResourceManager.MachineLearning.Models.AccountKeyDatastoreSecrets secrets) { } - public Azure.ResourceManager.MachineLearning.Models.AccountKeyDatastoreSecrets Secrets { get { throw null; } set { } } - } - public partial class AccountKeyDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.DatastoreSecrets - { - public AccountKeyDatastoreSecrets() { } - public string Key { get { throw null; } set { } } - } - public partial class AksCompute : Azure.ResourceManager.MachineLearning.Models.Compute - { - public AksCompute() { } - public Azure.ResourceManager.MachineLearning.Models.AksSchemaProperties Properties { get { throw null; } set { } } - } - public partial class AksComputeSecrets : Azure.ResourceManager.MachineLearning.Models.ComputeSecrets - { - internal AksComputeSecrets() { } - public string AdminKubeConfig { get { throw null; } } - public string ImagePullSecretName { get { throw null; } } - public string UserKubeConfig { get { throw null; } } - } - public partial class AksNetworkingConfiguration - { - public AksNetworkingConfiguration() { } - public string DnsServiceIP { get { throw null; } set { } } - public string DockerBridgeCidr { get { throw null; } set { } } - public string ServiceCidr { get { throw null; } set { } } - public string SubnetId { get { throw null; } set { } } - } - public partial class AksSchemaProperties - { - public AksSchemaProperties() { } - public int? AgentCount { get { throw null; } set { } } - public string AgentVmSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.AksNetworkingConfiguration AksNetworkingConfiguration { get { throw null; } set { } } - public string ClusterFqdn { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ClusterPurpose? ClusterPurpose { get { throw null; } set { } } - public string LoadBalancerSubnet { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.LoadBalancerType? LoadBalancerType { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.SslConfiguration SslConfiguration { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList SystemServices { get { throw null; } } + public AutoMLVerticalRegression(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TestData { get { throw null; } set { } } + public double? TestDataSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.RegressionTrainingSettings TrainingSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + public string WeightColumnName { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AllocationState : System.IEquatable + public readonly partial struct AutoMLVerticalRegressionModel : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public AllocationState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.AllocationState Resizing { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.AllocationState Steady { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.AllocationState other) { throw null; } + public AutoMLVerticalRegressionModel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel DecisionTree { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel ElasticNet { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel ExtremeRandomTrees { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel GradientBoosting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel KNN { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel LassoLars { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel LightGBM { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel RandomForest { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel SGD { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel XGBoostRegressor { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel 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.AllocationState left, Azure.ResourceManager.MachineLearning.Models.AllocationState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.AllocationState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AllocationState left, Azure.ResourceManager.MachineLearning.Models.AllocationState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel left, Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel left, Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionModel right) { throw null; } public override string ToString() { throw null; } } - public partial class AmlCompute : Azure.ResourceManager.MachineLearning.Models.Compute - { - public AmlCompute() { } - public Azure.ResourceManager.MachineLearning.Models.AmlComputeProperties Properties { get { throw null; } set { } } - } - public partial class AmlComputeNodeInformation - { - internal AmlComputeNodeInformation() { } - public string NodeId { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.NodeState? NodeState { get { throw null; } } - public int? Port { get { throw null; } } - public string PrivateIPAddress { get { throw null; } } - public string PublicIPAddress { get { throw null; } } - public string RunId { get { throw null; } } - } - public partial class AmlComputeProperties - { - public AmlComputeProperties() { } - public Azure.ResourceManager.MachineLearning.Models.AllocationState? AllocationState { get { throw null; } } - public System.DateTimeOffset? AllocationStateTransitionOn { get { throw null; } } - public int? CurrentNodeCount { get { throw null; } } - public bool? EnableNodePublicIP { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public bool? IsolatedNetwork { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.NodeStateCounts NodeStateCounts { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.OSType? OSType { get { throw null; } set { } } - public System.BinaryData PropertyBag { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess? RemoteLoginPortPublicAccess { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ScaleSettings ScaleSettings { get { throw null; } set { } } - public string SubnetId { get { throw null; } set { } } - public int? TargetNodeCount { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.UserAccountCredentials UserAccountCredentials { get { throw null; } set { } } - public string VirtualMachineImageId { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.VmPriority? VmPriority { get { throw null; } set { } } - public string VmSize { get { throw null; } set { } } - } - public partial class AmlToken : Azure.ResourceManager.MachineLearning.Models.IdentityConfiguration - { - public AmlToken() { } - } - public partial class AmlUserFeature - { - internal AmlUserFeature() { } - public string Description { get { throw null; } } - public string DisplayName { get { throw null; } } - public string Id { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ApplicationSharingPolicy : System.IEquatable + public readonly partial struct AutoMLVerticalRegressionPrimaryMetric : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ApplicationSharingPolicy(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy Personal { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy Shared { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy other) { throw null; } + public AutoMLVerticalRegressionPrimaryMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric NormalizedMeanAbsoluteError { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric NormalizedRootMeanSquaredError { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric R2Score { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric SpearmanCorrelation { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric 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.ApplicationSharingPolicy left, Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy left, Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.AutoMLVerticalRegressionPrimaryMetric right) { throw null; } public override string ToString() { throw null; } } - public partial class AssetBase : Azure.ResourceManager.MachineLearning.Models.ResourceBase - { - public AssetBase() { } - public bool? IsAnonymous { get { throw null; } set { } } - public bool? IsArchived { get { throw null; } set { } } - } - public partial class AssetContainer : Azure.ResourceManager.MachineLearning.Models.ResourceBase - { - public AssetContainer() { } - public bool? IsArchived { get { throw null; } set { } } - public string LatestVersion { get { throw null; } } - public string NextVersion { get { throw null; } } - } - public abstract partial class AssetReferenceBase - { - protected AssetReferenceBase() { } - } - public partial class AssignedUser - { - public AssignedUser(string objectId, System.Guid tenantId) { } - public string ObjectId { get { throw null; } set { } } - public System.Guid TenantId { get { throw null; } set { } } - } - public partial class AutoForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon - { - public AutoForecastHorizon() { } - } - public partial class AutoMLJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties - { - public AutoMLJob(Azure.ResourceManager.MachineLearning.Models.AutoMLVertical taskDetails) { } - public string EnvironmentId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.JobResourceConfiguration Resources { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.AutoMLVertical TaskDetails { get { throw null; } set { } } - } - public abstract partial class AutoMLVertical - { - protected AutoMLVertical(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) { } - public Azure.ResourceManager.MachineLearning.Models.LogVerbosity? LogVerbosity { get { throw null; } set { } } - public string TargetColumnName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput TrainingData { get { throw null; } set { } } - } public partial class AutoNCrossValidations : Azure.ResourceManager.MachineLearning.Models.NCrossValidations { public AutoNCrossValidations() { } } - public partial class AutoPauseProperties - { - public AutoPauseProperties() { } - public int? DelayInMinutes { get { throw null; } set { } } - public bool? Enabled { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AutoRebuildSetting : System.IEquatable { @@ -1137,33 +1108,7 @@ public AutoPauseProperties() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting left, Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Autosave : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public Autosave(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.Autosave Local { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Autosave None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Autosave Remote { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.Autosave 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.Autosave left, Azure.ResourceManager.MachineLearning.Models.Autosave right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.Autosave (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.Autosave left, Azure.ResourceManager.MachineLearning.Models.Autosave right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AutoScaleProperties - { - public AutoScaleProperties() { } - public bool? Enabled { get { throw null; } set { } } - public int? MaxNodeCount { get { throw null; } set { } } - public int? MinNodeCount { get { throw null; } set { } } - } - public partial class AutoSeasonality : Azure.ResourceManager.MachineLearning.Models.Seasonality + public partial class AutoSeasonality : Azure.ResourceManager.MachineLearning.Models.ForecastingSeasonality { public AutoSeasonality() { } } @@ -1175,137 +1120,17 @@ public partial class AutoTargetRollingWindowSize : Azure.ResourceManager.Machine { public AutoTargetRollingWindowSize() { } } - public partial class AzureBlobDatastore : Azure.ResourceManager.MachineLearning.Models.DatastoreProperties - { - public AzureBlobDatastore(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials credentials) : base (default(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials)) { } - public string AccountName { get { throw null; } set { } } - public string ContainerName { get { throw null; } set { } } - public string Endpoint { get { throw null; } set { } } - public string Protocol { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } - } - public partial class AzureDataLakeGen1Datastore : Azure.ResourceManager.MachineLearning.Models.DatastoreProperties - { - public AzureDataLakeGen1Datastore(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials credentials, string storeName) : base (default(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials)) { } - public Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } - public string StoreName { get { throw null; } set { } } - } - public partial class AzureDataLakeGen2Datastore : Azure.ResourceManager.MachineLearning.Models.DatastoreProperties - { - public AzureDataLakeGen2Datastore(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials credentials, string accountName, string filesystem) : base (default(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials)) { } - public string AccountName { get { throw null; } set { } } - public string Endpoint { get { throw null; } set { } } - public string Filesystem { get { throw null; } set { } } - public string Protocol { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } - } - public partial class AzureFileDatastore : Azure.ResourceManager.MachineLearning.Models.DatastoreProperties - { - public AzureFileDatastore(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials credentials, string accountName, string fileShareName) : base (default(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials)) { } - public string AccountName { get { throw null; } set { } } - public string Endpoint { get { throw null; } set { } } - public string FileShareName { get { throw null; } set { } } - public string Protocol { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } - } - public partial class BanditPolicy : Azure.ResourceManager.MachineLearning.Models.EarlyTerminationPolicy + public partial class BanditPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy { public BanditPolicy() { } public float? SlackAmount { get { throw null; } set { } } public float? SlackFactor { get { throw null; } set { } } } - public partial class BatchDeploymentPatch - { - public BatchDeploymentPatch() { } - public string PartialBatchDeploymentDescription { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class BatchDeploymentProperties : Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentPropertiesBase - { - public BatchDeploymentProperties() { } - public string Compute { get { throw null; } set { } } - public int? ErrorThreshold { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel? LoggingLevel { get { throw null; } set { } } - public int? MaxConcurrencyPerInstance { get { throw null; } set { } } - public long? MiniBatchSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.AssetReferenceBase Model { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.BatchOutputAction? OutputAction { get { throw null; } set { } } - public string OutputFileName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.DeploymentResourceConfiguration Resources { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.BatchRetrySettings RetrySettings { get { throw null; } set { } } - } - public partial class BatchEndpointProperties : Azure.ResourceManager.MachineLearning.Models.EndpointPropertiesBase - { - public BatchEndpointProperties(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode authMode) : base (default(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode)) { } - public string DefaultsDeploymentName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState? ProvisioningState { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BatchLoggingLevel : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BatchLoggingLevel(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel Debug { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel Info { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel Warning { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel 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.BatchLoggingLevel left, Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel left, Azure.ResourceManager.MachineLearning.Models.BatchLoggingLevel right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BatchOutputAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BatchOutputAction(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.BatchOutputAction AppendRow { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.BatchOutputAction SummaryOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.BatchOutputAction 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.BatchOutputAction left, Azure.ResourceManager.MachineLearning.Models.BatchOutputAction right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.BatchOutputAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.BatchOutputAction left, Azure.ResourceManager.MachineLearning.Models.BatchOutputAction right) { throw null; } - public override string ToString() { throw null; } - } - public partial class BatchRetrySettings - { - public BatchRetrySettings() { } - public int? MaxRetries { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } - } public partial class BayesianSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm { public BayesianSamplingAlgorithm() { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct BillingCurrency : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public BillingCurrency(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.BillingCurrency Usd { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.BillingCurrency 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.BillingCurrency left, Azure.ResourceManager.MachineLearning.Models.BillingCurrency right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.BillingCurrency (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.BillingCurrency left, Azure.ResourceManager.MachineLearning.Models.BillingCurrency right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BlockedTransformer : System.IEquatable { private readonly object _dummy; @@ -1331,62 +1156,6 @@ public BayesianSamplingAlgorithm() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.BlockedTransformer left, Azure.ResourceManager.MachineLearning.Models.BlockedTransformer right) { throw null; } public override string ToString() { throw null; } } - public partial class BuildContext - { - public BuildContext(System.Uri contextUri) { } - public System.Uri ContextUri { get { throw null; } set { } } - public string DockerfilePath { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Caching : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public Caching(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.Caching None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Caching ReadOnly { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Caching ReadWrite { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.Caching 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.Caching left, Azure.ResourceManager.MachineLearning.Models.Caching right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.Caching (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.Caching left, Azure.ResourceManager.MachineLearning.Models.Caching right) { throw null; } - public override string ToString() { throw null; } - } - public partial class CertificateDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials - { - public CertificateDatastoreCredentials(System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.CertificateDatastoreSecrets secrets, System.Guid tenantId, string thumbprint) { } - public System.Uri AuthorityUri { get { throw null; } set { } } - public System.Guid ClientId { get { throw null; } set { } } - public System.Uri ResourceUri { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.CertificateDatastoreSecrets Secrets { get { throw null; } set { } } - public System.Guid TenantId { get { throw null; } set { } } - public string Thumbprint { get { throw null; } set { } } - } - public partial class CertificateDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.DatastoreSecrets - { - public CertificateDatastoreSecrets() { } - public string Certificate { get { throw null; } set { } } - } - public partial class Classification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical - { - public Classification(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } - public string PositiveLabel { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput TestData { get { throw null; } set { } } - public double? TestDataSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ClassificationTrainingSettings TrainingSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } - public string WeightColumnName { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ClassificationModel : System.IEquatable { @@ -1459,1422 +1228,2113 @@ public Classification(Azure.ResourceManager.MachineLearning.Models.MLTableJobInp public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric right) { throw null; } public override string ToString() { throw null; } } - public partial class ClassificationTrainingSettings : Azure.ResourceManager.MachineLearning.Models.TrainingSettings + public partial class ClassificationTask : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + { + public ClassificationTask(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } + public string PositiveLabel { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TestData { get { throw null; } set { } } + public double? TestDataSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ClassificationTrainingSettings TrainingSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + public string WeightColumnName { get { throw null; } set { } } + } + public partial class ClassificationTrainingSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningTrainingSettings { public ClassificationTrainingSettings() { } public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ClusterPurpose : System.IEquatable + public partial class ColumnTransformer { - private readonly object _dummy; + public ColumnTransformer() { } + public System.Collections.Generic.IList Fields { get { throw null; } set { } } + public System.BinaryData Parameters { get { throw null; } set { } } + } + public partial class CronTrigger : Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase + { + public CronTrigger(string expression) { } + public string Expression { get { throw null; } set { } } + } + public partial class CustomForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon + { + public CustomForecastHorizon(int value) { } + public int Value { get { throw null; } set { } } + } + public partial class CustomNCrossValidations : Azure.ResourceManager.MachineLearning.Models.NCrossValidations + { + public CustomNCrossValidations(int value) { } + public int Value { get { throw null; } set { } } + } + public partial class CustomSeasonality : Azure.ResourceManager.MachineLearning.Models.ForecastingSeasonality + { + public CustomSeasonality(int value) { } + public int Value { get { throw null; } set { } } + } + public partial class CustomTargetLags : Azure.ResourceManager.MachineLearning.Models.TargetLags + { + public CustomTargetLags(System.Collections.Generic.IEnumerable values) { } + public System.Collections.Generic.IList Values { get { throw null; } } + } + public partial class CustomTargetRollingWindowSize : Azure.ResourceManager.MachineLearning.Models.TargetRollingWindowSize + { + public CustomTargetRollingWindowSize(int value) { } + public int Value { get { throw null; } set { } } + } + public abstract partial class ForecastHorizon + { + protected ForecastHorizon() { } + } + public partial class Forecasting : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + { + public Forecasting(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ForecastingSettings ForecastingSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput TestData { get { throw null; } set { } } + public double? TestDataSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ForecastingTrainingSettings TrainingSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + public string WeightColumnName { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ForecastingModel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ForecastingModel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Arimax { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel AutoArima { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Average { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel DecisionTree { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel ElasticNet { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel ExponentialSmoothing { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel ExtremeRandomTrees { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel GradientBoosting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel KNN { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel LassoLars { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel LightGBM { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Naive { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Prophet { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel RandomForest { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel SeasonalAverage { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel SeasonalNaive { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel SGD { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel TCNForecaster { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel XGBoostRegressor { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ForecastingModel 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.ForecastingModel left, Azure.ResourceManager.MachineLearning.Models.ForecastingModel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ForecastingModel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ForecastingModel left, Azure.ResourceManager.MachineLearning.Models.ForecastingModel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ForecastingPrimaryMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ForecastingPrimaryMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric NormalizedMeanAbsoluteError { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric NormalizedRootMeanSquaredError { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric R2Score { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric SpearmanCorrelation { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric 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.ForecastingPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class ForecastingSeasonality + { + protected ForecastingSeasonality() { } + } + public partial class ForecastingSettings + { + public ForecastingSettings() { } + public string CountryOrRegionForHolidays { get { throw null; } set { } } + public int? CvStepSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag? FeatureLags { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ForecastHorizon ForecastHorizon { get { throw null; } set { } } + public string Frequency { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ForecastingSeasonality Seasonality { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration? ShortSeriesHandlingConfig { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TargetAggregationFunction? TargetAggregateFunction { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TargetLags TargetLags { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TargetRollingWindowSize TargetRollingWindowSize { get { throw null; } set { } } + public string TimeColumnName { get { throw null; } set { } } + public System.Collections.Generic.IList TimeSeriesIdColumnNames { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl? UseStl { get { throw null; } set { } } + } + public partial class ForecastingTrainingSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningTrainingSettings + { + public ForecastingTrainingSettings() { } + public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } + public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } + } + public partial class GridSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm + { + public GridSamplingAlgorithm() { } + } + public partial class ImageClassification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + { + public ImageClassification(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsClassification ModelSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + } + public partial class ImageClassificationMultilabel : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + { + public ImageClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsClassification ModelSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + } + public partial class ImageInstanceSegmentation : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + { + public ImageInstanceSegmentation(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsObjectDetection ModelSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + } + public partial class ImageLimitSettings + { + public ImageLimitSettings() { } + public int? MaxConcurrentTrials { get { throw null; } set { } } + public int? MaxTrials { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } + } + public partial class ImageModelDistributionSettings + { + public ImageModelDistributionSettings() { } + public string AmsGradient { get { throw null; } set { } } + public string Augmentations { get { throw null; } set { } } + public string Beta1 { get { throw null; } set { } } + public string Beta2 { get { throw null; } set { } } + public string Distributed { get { throw null; } set { } } + public string EarlyStopping { get { throw null; } set { } } + public string EarlyStoppingDelay { get { throw null; } set { } } + public string EarlyStoppingPatience { get { throw null; } set { } } + public string EnableOnnxNormalization { get { throw null; } set { } } + public string EvaluationFrequency { get { throw null; } set { } } + public string GradientAccumulationStep { get { throw null; } set { } } + public string LayersToFreeze { get { throw null; } set { } } + public string LearningRate { get { throw null; } set { } } + public string LearningRateScheduler { get { throw null; } set { } } + public string ModelName { get { throw null; } set { } } + public string Momentum { get { throw null; } set { } } + public string Nesterov { get { throw null; } set { } } + public string NumberOfEpochs { get { throw null; } set { } } + public string NumberOfWorkers { get { throw null; } set { } } + public string Optimizer { get { throw null; } set { } } + public string RandomSeed { get { throw null; } set { } } + public string StepLRGamma { get { throw null; } set { } } + public string StepLRStepSize { get { throw null; } set { } } + public string TrainingBatchSize { get { throw null; } set { } } + public string ValidationBatchSize { get { throw null; } set { } } + public string WarmupCosineLRCycles { get { throw null; } set { } } + public string WarmupCosineLRWarmupEpochs { get { throw null; } set { } } + public string WeightDecay { get { throw null; } set { } } + } + public partial class ImageModelDistributionSettingsClassification : Azure.ResourceManager.MachineLearning.Models.ImageModelDistributionSettings + { + public ImageModelDistributionSettingsClassification() { } + public string TrainingCropSize { get { throw null; } set { } } + public string ValidationCropSize { get { throw null; } set { } } + public string ValidationResizeSize { get { throw null; } set { } } + public string WeightedLoss { get { throw null; } set { } } + } + public partial class ImageModelDistributionSettingsObjectDetection : Azure.ResourceManager.MachineLearning.Models.ImageModelDistributionSettings + { + public ImageModelDistributionSettingsObjectDetection() { } + public string BoxDetectionsPerImage { get { throw null; } set { } } + public string BoxScoreThreshold { get { throw null; } set { } } + public string ImageSize { get { throw null; } set { } } + public string MaxSize { get { throw null; } set { } } + public string MinSize { get { throw null; } set { } } + public string ModelSize { get { throw null; } set { } } + public string MultiScale { get { throw null; } set { } } + public string NmsIouThreshold { get { throw null; } set { } } + public string TileGridSize { get { throw null; } set { } } + public string TileOverlapRatio { get { throw null; } set { } } + public string TilePredictionsNmsThreshold { get { throw null; } set { } } + public string ValidationIouThreshold { get { throw null; } set { } } + public string ValidationMetricType { get { throw null; } set { } } + } + public partial class ImageModelSettings + { + public ImageModelSettings() { } + public string AdvancedSettings { get { throw null; } set { } } + public bool? AmsGradient { get { throw null; } set { } } + public string Augmentations { get { throw null; } set { } } + public float? Beta1 { get { throw null; } set { } } + public float? Beta2 { get { throw null; } set { } } + public int? CheckpointFrequency { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFlowModelJobInput CheckpointModel { get { throw null; } set { } } + public string CheckpointRunId { get { throw null; } set { } } + public bool? Distributed { get { throw null; } set { } } + public bool? EarlyStopping { get { throw null; } set { } } + public int? EarlyStoppingDelay { get { throw null; } set { } } + public int? EarlyStoppingPatience { get { throw null; } set { } } + public bool? EnableOnnxNormalization { get { throw null; } set { } } + public int? EvaluationFrequency { get { throw null; } set { } } + public int? GradientAccumulationStep { get { throw null; } set { } } + public int? LayersToFreeze { get { throw null; } set { } } + public float? LearningRate { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler? LearningRateScheduler { get { throw null; } set { } } + public string ModelName { get { throw null; } set { } } + public float? Momentum { get { throw null; } set { } } + public bool? Nesterov { get { throw null; } set { } } + public int? NumberOfEpochs { get { throw null; } set { } } + public int? NumberOfWorkers { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer? Optimizer { get { throw null; } set { } } + public int? RandomSeed { get { throw null; } set { } } + public float? StepLRGamma { get { throw null; } set { } } + public int? StepLRStepSize { get { throw null; } set { } } + public int? TrainingBatchSize { get { throw null; } set { } } + public int? ValidationBatchSize { get { throw null; } set { } } + public float? WarmupCosineLRCycles { get { throw null; } set { } } + public int? WarmupCosineLRWarmupEpochs { get { throw null; } set { } } + public float? WeightDecay { get { throw null; } set { } } + } + public partial class ImageModelSettingsClassification : Azure.ResourceManager.MachineLearning.Models.ImageModelSettings + { + public ImageModelSettingsClassification() { } + public int? TrainingCropSize { get { throw null; } set { } } + public int? ValidationCropSize { get { throw null; } set { } } + public int? ValidationResizeSize { get { throw null; } set { } } + public int? WeightedLoss { get { throw null; } set { } } + } + public partial class ImageModelSettingsObjectDetection : Azure.ResourceManager.MachineLearning.Models.ImageModelSettings + { + public ImageModelSettingsObjectDetection() { } + public int? BoxDetectionsPerImage { get { throw null; } set { } } + public float? BoxScoreThreshold { get { throw null; } set { } } + public int? ImageSize { get { throw null; } set { } } + public int? MaxSize { get { throw null; } set { } } + public int? MinSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize? ModelSize { get { throw null; } set { } } + public bool? MultiScale { get { throw null; } set { } } + public float? NmsIouThreshold { get { throw null; } set { } } + public string TileGridSize { get { throw null; } set { } } + public float? TileOverlapRatio { get { throw null; } set { } } + public float? TilePredictionsNmsThreshold { get { throw null; } set { } } + public float? ValidationIouThreshold { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ValidationMetricType? ValidationMetricType { get { throw null; } set { } } + } + public partial class ImageObjectDetection : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + { + public ImageObjectDetection(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } + public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsObjectDetection ModelSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric? PrimaryMetric { get { throw null; } set { } } + public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } + public double? ValidationDataSize { get { throw null; } set { } } + } + public partial class ImageSweepSettings + { + public ImageSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType samplingAlgorithm) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy EarlyTermination { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType SamplingAlgorithm { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstanceSegmentationPrimaryMetric : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceSegmentationPrimaryMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric MeanAveragePrecision { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric 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.InstanceSegmentationPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct LearningRateScheduler : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LearningRateScheduler(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler Step { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler WarmupCosine { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler 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.LearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MachineLearningAccountKeyDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials + { + public MachineLearningAccountKeyDatastoreCredentials(Azure.ResourceManager.MachineLearning.Models.MachineLearningAccountKeyDatastoreSecrets secrets) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAccountKeyDatastoreSecrets Secrets { get { throw null; } set { } } + } + public partial class MachineLearningAccountKeyDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets + { + public MachineLearningAccountKeyDatastoreSecrets() { } + public string Key { get { throw null; } set { } } + } + public partial class MachineLearningAksCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties + { + public MachineLearningAksCompute() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAksComputeProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningAksComputeProperties + { + public MachineLearningAksComputeProperties() { } + public int? AgentCount { get { throw null; } set { } } + public string AgentVmSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAksNetworkingConfiguration AksNetworkingConfiguration { get { throw null; } set { } } + public string ClusterFqdn { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose? ClusterPurpose { get { throw null; } set { } } + public string LoadBalancerSubnet { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType? LoadBalancerType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfiguration SslConfiguration { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList SystemServices { get { throw null; } } + } + public partial class MachineLearningAksComputeSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeSecrets + { + internal MachineLearningAksComputeSecrets() { } + public string AdminKubeConfig { get { throw null; } } + public string ImagePullSecretName { get { throw null; } } + public string UserKubeConfig { get { throw null; } } + } + public partial class MachineLearningAksNetworkingConfiguration + { + public MachineLearningAksNetworkingConfiguration() { } + public string DnsServiceIP { get { throw null; } set { } } + public string DockerBridgeCidr { get { throw null; } set { } } + public string ServiceCidr { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningApplicationSharingPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningApplicationSharingPolicy(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy Personal { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy Shared { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy 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.MachineLearningApplicationSharingPolicy left, Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy left, Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MachineLearningAssetBase : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase + { + public MachineLearningAssetBase() { } + public bool? IsAnonymous { get { throw null; } set { } } + public bool? IsArchived { get { throw null; } set { } } + } + public partial class MachineLearningAssetContainer : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase + { + public MachineLearningAssetContainer() { } + public bool? IsArchived { get { throw null; } set { } } + public string LatestVersion { get { throw null; } } + public string NextVersion { get { throw null; } } + } + public abstract partial class MachineLearningAssetReferenceBase + { + protected MachineLearningAssetReferenceBase() { } + } + public partial class MachineLearningAutoPauseProperties + { + public MachineLearningAutoPauseProperties() { } + public int? DelayInMinutes { get { throw null; } set { } } + public bool? IsEnabled { get { throw null; } set { } } + } + public partial class MachineLearningAutoScaleProperties + { + public MachineLearningAutoScaleProperties() { } + public bool? IsEnabled { get { throw null; } set { } } + public int? MaxNodeCount { get { throw null; } set { } } + public int? MinNodeCount { get { throw null; } set { } } + } + public partial class MachineLearningAzureBlobDatastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties + { + public MachineLearningAzureBlobDatastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public string AccountName { get { throw null; } set { } } + public string ContainerName { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public string Protocol { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + } + public partial class MachineLearningAzureDataLakeGen1Datastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties + { + public MachineLearningAzureDataLakeGen1Datastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string storeName) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + public string StoreName { get { throw null; } set { } } + } + public partial class MachineLearningAzureDataLakeGen2Datastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties + { + public MachineLearningAzureDataLakeGen2Datastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string accountName, string filesystem) : 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 { } } + public string Protocol { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + } + public partial class MachineLearningAzureFileDatastore : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreProperties + { + public MachineLearningAzureFileDatastore(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials, string accountName, string fileShareName) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials)) { } + public string AccountName { get { throw null; } set { } } + public string Endpoint { get { throw null; } set { } } + public string FileShareName { get { throw null; } set { } } + public string Protocol { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get { throw null; } set { } } + } + public partial class MachineLearningBatchDeploymentPatch + { + public MachineLearningBatchDeploymentPatch() { } + public string PartialBatchDeploymentDescription { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class MachineLearningBatchDeploymentProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointDeploymentProperties + { + public MachineLearningBatchDeploymentProperties() { } + public string Compute { get { throw null; } set { } } + public int? ErrorThreshold { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel? LoggingLevel { get { throw null; } set { } } + public int? MaxConcurrencyPerInstance { get { throw null; } set { } } + public long? MiniBatchSize { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase Model { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction? OutputAction { get { throw null; } set { } } + public string OutputFileName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentResourceConfiguration Resources { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchRetrySettings RetrySettings { get { throw null; } set { } } + } + public partial class MachineLearningBatchEndpointProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProperties + { + public MachineLearningBatchEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode)) { } + public string DefaultsDeploymentName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? ProvisioningState { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningBatchLoggingLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningBatchLoggingLevel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel Debug { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel Info { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel 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.MachineLearningBatchLoggingLevel left, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel left, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchLoggingLevel right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningBatchOutputAction : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningBatchOutputAction(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction AppendRow { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction SummaryOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction 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.MachineLearningBatchOutputAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningBatchOutputAction right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MachineLearningBatchRetrySettings + { + public MachineLearningBatchRetrySettings() { } + public int? MaxRetries { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningBillingCurrency : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningBillingCurrency(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency Usd { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency 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.MachineLearningBillingCurrency left, Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency left, Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MachineLearningBuildContext + { + public MachineLearningBuildContext(System.Uri contextUri) { } + public System.Uri ContextUri { get { throw null; } set { } } + public string DockerfilePath { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningCachingType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningCachingType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType ReadOnly { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType ReadWrite { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType 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.MachineLearningCachingType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MachineLearningCertificateDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials + { + public MachineLearningCertificateDatastoreCredentials(System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.MachineLearningCertificateDatastoreSecrets secrets, System.Guid tenantId, string thumbprint) { } + public System.Uri AuthorityUri { get { throw null; } set { } } + public System.Guid ClientId { get { throw null; } set { } } + public System.Uri ResourceUri { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCertificateDatastoreSecrets Secrets { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + public string Thumbprint { get { throw null; } set { } } + } + public partial class MachineLearningCertificateDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets + { + public MachineLearningCertificateDatastoreSecrets() { } + public string Certificate { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningClusterPurpose : System.IEquatable + { + private readonly object _dummy; private readonly int _dummyPrimitive; - public ClusterPurpose(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ClusterPurpose DenseProd { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ClusterPurpose DevTest { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ClusterPurpose FastProd { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ClusterPurpose other) { throw null; } + public MachineLearningClusterPurpose(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose DenseProd { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose DevTest { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose FastProd { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose 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.ClusterPurpose left, Azure.ResourceManager.MachineLearning.Models.ClusterPurpose right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ClusterPurpose (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ClusterPurpose left, Azure.ResourceManager.MachineLearning.Models.ClusterPurpose right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose left, Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose left, Azure.ResourceManager.MachineLearning.Models.MachineLearningClusterPurpose right) { throw null; } public override string ToString() { throw null; } } - public partial class CodeConfiguration + public partial class MachineLearningCodeConfiguration { - public CodeConfiguration(string scoringScript) { } + public MachineLearningCodeConfiguration(string scoringScript) { } public string CodeId { get { throw null; } set { } } public string ScoringScript { get { throw null; } set { } } } - public partial class CodeContainerProperties : Azure.ResourceManager.MachineLearning.Models.AssetContainer + public partial class MachineLearningCodeContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { - public CodeContainerProperties() { } + public MachineLearningCodeContainerProperties() { } } - public partial class CodeVersionProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase + public partial class MachineLearningCodeVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { - public CodeVersionProperties() { } + public MachineLearningCodeVersionProperties() { } public System.Uri CodeUri { get { throw null; } set { } } } - public partial class ColumnTransformer - { - public ColumnTransformer() { } - public System.Collections.Generic.IList Fields { get { throw null; } set { } } - public System.BinaryData Parameters { get { throw null; } set { } } - } - public partial class CommandJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties + public partial class MachineLearningCommandJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties { - public CommandJob(string command, string environmentId) { } + public MachineLearningCommandJob(string command, string environmentId) { } public string CodeId { get { throw null; } set { } } public string Command { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DistributionConfiguration Distribution { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration Distribution { get { throw null; } set { } } public string EnvironmentId { get { throw null; } set { } } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.CommandJobLimits Limits { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCommandJobLimits Limits { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } public System.BinaryData Parameters { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.JobResourceConfiguration Resources { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration Resources { get { throw null; } set { } } } - public partial class CommandJobLimits : Azure.ResourceManager.MachineLearning.Models.JobLimits + public partial class MachineLearningCommandJobLimits : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobLimits { - public CommandJobLimits() { } + public MachineLearningCommandJobLimits() { } } - public partial class ComponentContainerProperties : Azure.ResourceManager.MachineLearning.Models.AssetContainer + public partial class MachineLearningComponentContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { - public ComponentContainerProperties() { } + public MachineLearningComponentContainerProperties() { } } - public partial class ComponentVersionProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase + public partial class MachineLearningComponentVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { - public ComponentVersionProperties() { } + public MachineLearningComponentVersionProperties() { } public System.BinaryData ComponentSpec { get { throw null; } set { } } } - public abstract partial class Compute - { - protected Compute() { } - public string ComputeLocation { get { throw null; } set { } } - public System.DateTimeOffset? CreatedOn { get { throw null; } } - public string Description { get { throw null; } set { } } - public bool? DisableLocalAuth { get { throw null; } set { } } - public bool? IsAttachedCompute { get { throw null; } } - public System.DateTimeOffset? ModifiedOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ProvisioningErrors { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ProvisioningState? ProvisioningState { get { throw null; } } - public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } - } - public partial class ComputeInstance : Azure.ResourceManager.MachineLearning.Models.Compute + public partial class MachineLearningComputeInstance : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public ComputeInstance() { } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceProperties Properties { get { throw null; } set { } } + public MachineLearningComputeInstance() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceProperties Properties { get { throw null; } set { } } } - public partial class ComputeInstanceApplication + public partial class MachineLearningComputeInstanceApplication { - internal ComputeInstanceApplication() { } + internal MachineLearningComputeInstanceApplication() { } public string DisplayName { get { throw null; } } public System.Uri EndpointUri { get { throw null; } } } + public partial class MachineLearningComputeInstanceAssignedUser + { + public MachineLearningComputeInstanceAssignedUser(string objectId, System.Guid tenantId) { } + public string ObjectId { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningComputeInstanceAuthorizationType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningComputeInstanceAuthorizationType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType Personal { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType 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.MachineLearningComputeInstanceAuthorizationType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ComputeInstanceAuthorizationType : System.IEquatable + public readonly partial struct MachineLearningComputeInstanceAutosave : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ComputeInstanceAuthorizationType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType Personal { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType other) { throw null; } + public MachineLearningComputeInstanceAutosave(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave Local { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave Remote { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave 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.ComputeInstanceAuthorizationType left, Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType left, Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave right) { throw null; } public override string ToString() { throw null; } } - public partial class ComputeInstanceConnectivityEndpoints + public partial class MachineLearningComputeInstanceConnectivityEndpoints { - internal ComputeInstanceConnectivityEndpoints() { } + internal MachineLearningComputeInstanceConnectivityEndpoints() { } public string PrivateIPAddress { get { throw null; } } public string PublicIPAddress { get { throw null; } } } - public partial class ComputeInstanceContainer + public partial class MachineLearningComputeInstanceContainer { - internal ComputeInstanceContainer() { } - public Azure.ResourceManager.MachineLearning.Models.Autosave? Autosave { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceEnvironmentInfo Environment { get { throw null; } } + internal MachineLearningComputeInstanceContainer() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAutosave? Autosave { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceEnvironmentInfo Environment { get { throw null; } } public string Gpu { get { throw null; } } public string Name { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.Network? Network { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork? Network { get { throw null; } } public System.Collections.Generic.IReadOnlyList Services { get { throw null; } } } - public partial class ComputeInstanceCreatedBy + public partial class MachineLearningComputeInstanceCreatedBy { - internal ComputeInstanceCreatedBy() { } + internal MachineLearningComputeInstanceCreatedBy() { } public string UserId { get { throw null; } } public string UserName { get { throw null; } } public string UserOrgId { get { throw null; } } } - public partial class ComputeInstanceDataDisk + public partial class MachineLearningComputeInstanceDataDisk { - internal ComputeInstanceDataDisk() { } - public Azure.ResourceManager.MachineLearning.Models.Caching? Caching { get { throw null; } } + internal MachineLearningComputeInstanceDataDisk() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCachingType? Caching { get { throw null; } } public int? DiskSizeGB { get { throw null; } } public int? Lun { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.StorageAccountType? StorageAccountType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType? StorageAccountType { get { throw null; } } } - public partial class ComputeInstanceDataMount + public partial class MachineLearningComputeInstanceDataMount { - internal ComputeInstanceDataMount() { } + internal MachineLearningComputeInstanceDataMount() { } public string CreatedBy { get { throw null; } } public string Error { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MountAction? MountAction { 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.MountState? MountState { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState? MountState { get { throw null; } } public string Source { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.SourceType? SourceType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType? SourceType { get { throw null; } } } - public partial class ComputeInstanceEnvironmentInfo + public partial class MachineLearningComputeInstanceEnvironmentInfo { - internal ComputeInstanceEnvironmentInfo() { } + internal MachineLearningComputeInstanceEnvironmentInfo() { } public string Name { get { throw null; } } public string Version { get { throw null; } } } - public partial class ComputeInstanceLastOperation + public partial class MachineLearningComputeInstanceLastOperation { - internal ComputeInstanceLastOperation() { } - public Azure.ResourceManager.MachineLearning.Models.OperationName? OperationName { get { throw null; } } + internal MachineLearningComputeInstanceLastOperation() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName? OperationName { get { throw null; } } public System.DateTimeOffset? OperationOn { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.OperationStatus? OperationStatus { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.OperationTrigger? OperationTrigger { get { throw null; } } - } - public partial class ComputeInstanceProperties - { - public ComputeInstanceProperties() { } - public System.Collections.Generic.IReadOnlyList Applications { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ApplicationSharingPolicy? ApplicationSharingPolicy { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceCreatedBy CreatedBy { get { throw null; } } - public System.Collections.Generic.IReadOnlyList DataDisks { get { throw null; } } - public System.Collections.Generic.IReadOnlyList DataMounts { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus? OperationStatus { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger? OperationTrigger { get { throw null; } } + } + public partial class MachineLearningComputeInstanceProperties + { + public MachineLearningComputeInstanceProperties() { } + public System.Collections.Generic.IReadOnlyList Applications { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningApplicationSharingPolicy? ApplicationSharingPolicy { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Containers { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceCreatedBy CreatedBy { get { throw null; } } + 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 System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceLastOperation LastOperation { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.AssignedUser PersonalComputeInstanceAssignedUser { get { throw null; } set { } } - public System.Collections.Generic.IReadOnlyList SchedulesComputeStartStop { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ScriptsToExecute Scripts { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceSshSettings SshSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState? State { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceLastOperation LastOperation { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceAssignedUser PersonalComputeInstanceAssignedUser { 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 { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState? State { get { throw null; } } public string SubnetId { get { throw null; } set { } } public string VersionsRuntime { get { throw null; } } public string VmSize { get { throw null; } set { } } } - public partial class ComputeInstanceSshSettings + public partial class MachineLearningComputeInstanceSshSettings { - public ComputeInstanceSshSettings() { } + public MachineLearningComputeInstanceSshSettings() { } public string AdminPublicKey { get { throw null; } set { } } public string AdminUserName { get { throw null; } } public int? SshPort { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.SshPublicAccess? SshPublicAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess? SshPublicAccess { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningComputeInstanceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningComputeInstanceState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState CreateFailed { get { throw null; } } + 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 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; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState SetupFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Starting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Stopped { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Stopping { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Unknown { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState Unusable { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState UserSettingUp { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState UserSetupFailed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState 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.MachineLearningComputeInstanceState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeInstanceState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MachineLearningComputePatch + { + public MachineLearningComputePatch() { } + public Azure.ResourceManager.MachineLearning.Models.AmlComputeScaleSettings ScaleSettings { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ComputeInstanceState : System.IEquatable + public readonly partial struct MachineLearningComputePowerAction : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ComputeInstanceState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState CreateFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Creating { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Deleting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState JobRunning { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Restarting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Running { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState SettingUp { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState SetupFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Starting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Stopped { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Stopping { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Unknown { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState Unusable { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState UserSettingUp { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState UserSetupFailed { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState other) { throw null; } + public MachineLearningComputePowerAction(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction Start { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction Stop { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction 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.ComputeInstanceState left, Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState left, Azure.ResourceManager.MachineLearning.Models.ComputeInstanceState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class MachineLearningComputeProperties + { + protected MachineLearningComputeProperties() { } + public string ComputeLocation { get { throw null; } set { } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string Description { get { throw null; } set { } } + public bool? DisableLocalAuth { get { throw null; } set { } } + public bool? IsAttachedCompute { get { throw null; } } + public System.DateTimeOffset? ModifiedOn { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProvisioningErrors { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ComputePowerAction : System.IEquatable + public readonly partial struct MachineLearningComputeProvisioningStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ComputePowerAction(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ComputePowerAction Start { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ComputePowerAction Stop { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ComputePowerAction other) { throw null; } + public MachineLearningComputeProvisioningStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus Completed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus Provisioning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus 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.ComputePowerAction left, Azure.ResourceManager.MachineLearning.Models.ComputePowerAction right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ComputePowerAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ComputePowerAction left, Azure.ResourceManager.MachineLearning.Models.ComputePowerAction right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus right) { throw null; } public override string ToString() { throw null; } } - public abstract partial class ComputeSecrets + public abstract partial class MachineLearningComputeSecrets { - protected ComputeSecrets() { } + protected MachineLearningComputeSecrets() { } } - public partial class ComputeStartStopSchedule + public partial class MachineLearningComputeStartStopSchedule { - internal ComputeStartStopSchedule() { } - public Azure.ResourceManager.MachineLearning.Models.ComputePowerAction? Action { get { throw null; } } + internal MachineLearningComputeStartStopSchedule() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputePowerAction? Action { get { throw null; } } public Azure.ResourceManager.MachineLearning.Models.CronTrigger Cron { get { throw null; } } public string Id { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus? ProvisioningStatus { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.RecurrenceTrigger Recurrence { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ScheduleBase Schedule { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ScheduleStatus? Status { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.TriggerType? TriggerType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProvisioningStatus? ProvisioningStatus { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceTrigger Recurrence { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleBase Schedule { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType? TriggerType { get { throw null; } } + } + public partial class MachineLearningComputeSystemService + { + internal MachineLearningComputeSystemService() { } + public string PublicIPAddress { get { throw null; } } + public string SystemServiceType { get { throw null; } } + public string Version { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ConnectionCategory : System.IEquatable + public readonly partial struct MachineLearningConnectionCategory : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ConnectionCategory(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ConnectionCategory ContainerRegistry { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ConnectionCategory Git { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ConnectionCategory PythonFeed { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ConnectionCategory other) { throw null; } + public MachineLearningConnectionCategory(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory ContainerRegistry { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory Git { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory PythonFeed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory 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.ConnectionCategory left, Azure.ResourceManager.MachineLearning.Models.ConnectionCategory right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ConnectionCategory (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ConnectionCategory left, Azure.ResourceManager.MachineLearning.Models.ConnectionCategory right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory left, Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory left, Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory right) { throw null; } public override string ToString() { throw null; } } - public partial class ContainerResourceRequirements + public partial class MachineLearningContainerRegistryCredentials + { + internal MachineLearningContainerRegistryCredentials() { } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Passwords { get { throw null; } } + public string Username { get { throw null; } } + } + public partial class MachineLearningContainerResourceRequirements { - public ContainerResourceRequirements() { } - public Azure.ResourceManager.MachineLearning.Models.ContainerResourceSettings ContainerResourceLimits { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ContainerResourceSettings ContainerResourceRequests { get { throw null; } set { } } + public MachineLearningContainerResourceRequirements() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceSettings ContainerResourceLimits { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceSettings ContainerResourceRequests { get { throw null; } set { } } } - public partial class ContainerResourceSettings + public partial class MachineLearningContainerResourceSettings { - public ContainerResourceSettings() { } + public MachineLearningContainerResourceSettings() { } public string Cpu { get { throw null; } set { } } public string Gpu { get { throw null; } set { } } public string Memory { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ContainerType : System.IEquatable + public readonly partial struct MachineLearningContainerType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ContainerType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ContainerType InferenceServer { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ContainerType StorageInitializer { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ContainerType other) { throw null; } + public MachineLearningContainerType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType InferenceServer { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType StorageInitializer { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType 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.ContainerType left, Azure.ResourceManager.MachineLearning.Models.ContainerType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ContainerType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ContainerType left, Azure.ResourceManager.MachineLearning.Models.ContainerType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType right) { throw null; } public override string ToString() { throw null; } } - public partial class CronTrigger : Azure.ResourceManager.MachineLearning.Models.TriggerBase - { - public CronTrigger(string expression) { } - public string Expression { get { throw null; } set { } } - } - public partial class CustomForecastHorizon : Azure.ResourceManager.MachineLearning.Models.ForecastHorizon - { - public CustomForecastHorizon(int value) { } - public int Value { get { throw null; } set { } } - } - public partial class CustomModelJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput + public partial class MachineLearningCustomModelJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput { - public CustomModelJobInput(System.Uri uri) { } - public Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode? Mode { get { throw null; } set { } } + public MachineLearningCustomModelJobInput(System.Uri uri) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } - public partial class CustomModelJobOutput : Azure.ResourceManager.MachineLearning.Models.JobOutput + public partial class MachineLearningCustomModelJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { - public CustomModelJobOutput() { } - public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } + public MachineLearningCustomModelJobOutput() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } } - public partial class CustomNCrossValidations : Azure.ResourceManager.MachineLearning.Models.NCrossValidations - { - public CustomNCrossValidations(int value) { } - public int Value { get { throw null; } set { } } - } - public partial class CustomSeasonality : Azure.ResourceManager.MachineLearning.Models.Seasonality - { - public CustomSeasonality(int value) { } - public int Value { get { throw null; } set { } } - } - public partial class CustomTargetLags : Azure.ResourceManager.MachineLearning.Models.TargetLags - { - public CustomTargetLags(System.Collections.Generic.IEnumerable values) { } - public System.Collections.Generic.IList Values { get { throw null; } } - } - public partial class CustomTargetRollingWindowSize : Azure.ResourceManager.MachineLearning.Models.TargetRollingWindowSize - { - public CustomTargetRollingWindowSize(int value) { } - public int Value { get { throw null; } set { } } - } - public partial class DatabricksCompute : Azure.ResourceManager.MachineLearning.Models.Compute + public partial class MachineLearningDatabricksCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public DatabricksCompute() { } - public Azure.ResourceManager.MachineLearning.Models.DatabricksProperties Properties { get { throw null; } set { } } + public MachineLearningDatabricksCompute() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDatabricksProperties Properties { get { throw null; } set { } } } - public partial class DatabricksComputeSecrets : Azure.ResourceManager.MachineLearning.Models.ComputeSecrets + public partial class MachineLearningDatabricksComputeSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeSecrets { - internal DatabricksComputeSecrets() { } + internal MachineLearningDatabricksComputeSecrets() { } public string DatabricksAccessToken { get { throw null; } } } - public partial class DatabricksProperties + public partial class MachineLearningDatabricksProperties { - public DatabricksProperties() { } + public MachineLearningDatabricksProperties() { } public string DatabricksAccessToken { get { throw null; } set { } } public System.Uri WorkspaceUri { get { throw null; } set { } } } - public partial class DataContainerProperties : Azure.ResourceManager.MachineLearning.Models.AssetContainer + public partial class MachineLearningDataContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { - public DataContainerProperties(Azure.ResourceManager.MachineLearning.Models.DataType dataType) { } - public Azure.ResourceManager.MachineLearning.Models.DataType DataType { get { throw null; } set { } } + public MachineLearningDataContainerProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType dataType) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType DataType { get { throw null; } set { } } } - public partial class DataFactoryCompute : Azure.ResourceManager.MachineLearning.Models.Compute + public partial class MachineLearningDataFactoryCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public DataFactoryCompute() { } + public MachineLearningDataFactoryCompute() { } } - public partial class DataLakeAnalyticsCompute : Azure.ResourceManager.MachineLearning.Models.Compute + public partial class MachineLearningDataLakeAnalytics : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public DataLakeAnalyticsCompute() { } + public MachineLearningDataLakeAnalytics() { } public string DataLakeStoreAccountName { get { throw null; } set { } } } - public partial class DataPathAssetReference : Azure.ResourceManager.MachineLearning.Models.AssetReferenceBase + public partial class MachineLearningDataPathAssetReference : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase { - public DataPathAssetReference() { } + public MachineLearningDataPathAssetReference() { } public string DatastoreId { get { throw null; } set { } } public string Path { get { throw null; } set { } } } - public abstract partial class DatastoreCredentials + public abstract partial class MachineLearningDatastoreCredentials { - protected DatastoreCredentials() { } + protected MachineLearningDatastoreCredentials() { } } - public partial class DatastoreProperties : Azure.ResourceManager.MachineLearning.Models.ResourceBase + public partial class MachineLearningDatastoreProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase { - public DatastoreProperties(Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials credentials) { } - public Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials Credentials { get { throw null; } set { } } + public MachineLearningDatastoreProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials credentials) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials Credentials { get { throw null; } set { } } public bool? IsDefault { get { throw null; } } } - public abstract partial class DatastoreSecrets + public abstract partial class MachineLearningDatastoreSecrets { - protected DatastoreSecrets() { } + protected MachineLearningDatastoreSecrets() { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DataType : System.IEquatable + public readonly partial struct MachineLearningDataType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public DataType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.DataType Mltable { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DataType UriFile { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DataType UriFolder { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.DataType other) { throw null; } + public MachineLearningDataType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType Mltable { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType UriFile { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType UriFolder { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType 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.DataType left, Azure.ResourceManager.MachineLearning.Models.DataType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.DataType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DataType left, Azure.ResourceManager.MachineLearning.Models.DataType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDataType right) { throw null; } public override string ToString() { throw null; } } - public partial class DataVersionProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase + public partial class MachineLearningDataVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { - public DataVersionProperties(System.Uri dataUri) { } + public MachineLearningDataVersionProperties(System.Uri dataUri) { } public System.Uri DataUri { get { throw null; } set { } } } - public partial class DefaultScaleSettings : Azure.ResourceManager.MachineLearning.Models.OnlineScaleSettings - { - public DefaultScaleSettings() { } - } - public partial class DeploymentLogs - { - internal DeploymentLogs() { } - public string Content { get { throw null; } } - } - public partial class DeploymentLogsContent - { - public DeploymentLogsContent() { } - public Azure.ResourceManager.MachineLearning.Models.ContainerType? ContainerType { get { throw null; } set { } } - public int? Tail { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DeploymentProvisioningState : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DeploymentProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Scaling { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState 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.DeploymentProvisioningState left, Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState left, Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState right) { throw null; } - public override string ToString() { throw null; } - } - public partial class DeploymentResourceConfiguration : Azure.ResourceManager.MachineLearning.Models.ResourceConfiguration + public partial class MachineLearningDefaultScaleSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings { - public DeploymentResourceConfiguration() { } + public MachineLearningDefaultScaleSettings() { } } - public partial class DiagnoseRequestProperties - { - public DiagnoseRequestProperties() { } - public System.Collections.Generic.IDictionary ApplicationInsights { get { throw null; } } - public System.Collections.Generic.IDictionary ContainerRegistry { get { throw null; } } - public System.Collections.Generic.IDictionary DnsResolution { get { throw null; } } - 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 ResourceLock { get { throw null; } } - public System.Collections.Generic.IDictionary StorageAccount { get { throw null; } } - public System.Collections.Generic.IDictionary Udr { get { throw null; } } + public partial class MachineLearningDeploymentLogs + { + internal MachineLearningDeploymentLogs() { } + public string Content { get { throw null; } } + } + public partial class MachineLearningDeploymentLogsContent + { + public MachineLearningDeploymentLogsContent() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerType? ContainerType { get { throw null; } set { } } + public int? Tail { get { throw null; } set { } } } - public partial class DiagnoseResponseResult + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningDeploymentProvisioningState : System.IEquatable { - internal DiagnoseResponseResult() { } - public Azure.ResourceManager.MachineLearning.Models.DiagnoseResponseResultValue Value { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningDeploymentProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Scaling { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState 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.MachineLearningDeploymentProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState right) { throw null; } + public override string ToString() { throw null; } } - public partial class DiagnoseResponseResultValue + public partial class MachineLearningDeploymentResourceConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceConfiguration { - internal DiagnoseResponseResultValue() { } - public System.Collections.Generic.IReadOnlyList ApplicationInsightsResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ContainerRegistryResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList DnsResolutionResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList KeyVaultResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList NetworkSecurityRuleResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList OtherResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ResourceLockResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList StorageAccountResults { get { throw null; } } - public System.Collections.Generic.IReadOnlyList UserDefinedRouteResults { get { throw null; } } + public MachineLearningDeploymentResourceConfiguration() { } } - public partial class DiagnoseResult + public partial class MachineLearningDiagnoseResult { - internal DiagnoseResult() { } + internal MachineLearningDiagnoseResult() { } public string Code { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel? Level { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel? Level { get { throw null; } } public string Message { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct DiagnoseResultLevel : System.IEquatable + public readonly partial struct MachineLearningDiagnoseResultLevel : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public DiagnoseResultLevel(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel Error { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel Information { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel Warning { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel other) { throw null; } + public MachineLearningDiagnoseResultLevel(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel Error { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel Information { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel 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.DiagnoseResultLevel left, Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel left, Azure.ResourceManager.MachineLearning.Models.DiagnoseResultLevel right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel left, Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultLevel right) { throw null; } public override string ToString() { throw null; } } - public partial class DiagnoseWorkspaceContent + public partial class MachineLearningDiagnoseResultValue { - public DiagnoseWorkspaceContent() { } - public Azure.ResourceManager.MachineLearning.Models.DiagnoseRequestProperties Value { get { throw null; } set { } } + internal MachineLearningDiagnoseResultValue() { } + public System.Collections.Generic.IReadOnlyList ApplicationInsightsResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ContainerRegistryResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList DnsResolutionResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList KeyVaultResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkSecurityRuleResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList OtherResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceLockResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList StorageAccountResults { get { throw null; } } + public System.Collections.Generic.IReadOnlyList UserDefinedRouteResults { get { throw null; } } } - public abstract partial class DistributionConfiguration + public abstract partial class MachineLearningDistributionConfiguration { - protected DistributionConfiguration() { } + protected MachineLearningDistributionConfiguration() { } } - public abstract partial class EarlyTerminationPolicy + public abstract partial class MachineLearningEarlyTerminationPolicy { - protected EarlyTerminationPolicy() { } + protected MachineLearningEarlyTerminationPolicy() { } public int? DelayEvaluation { get { throw null; } set { } } public int? EvaluationInterval { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EgressPublicNetworkAccessType : System.IEquatable + public readonly partial struct MachineLearningEgressPublicNetworkAccessType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EgressPublicNetworkAccessType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType other) { throw null; } + public MachineLearningEgressPublicNetworkAccessType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType 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.EgressPublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType right) { throw null; } public override string ToString() { throw null; } } - public partial class EncryptionKeyVaultProperties + public partial class MachineLearningEncryptionKeyVaultProperties { - public EncryptionKeyVaultProperties(string keyVaultArmId, string keyIdentifier) { } + public MachineLearningEncryptionKeyVaultProperties(Azure.Core.ResourceIdentifier keyVaultArmId, string keyIdentifier) { } public string IdentityClientId { get { throw null; } set { } } public string KeyIdentifier { get { throw null; } set { } } - public string KeyVaultArmId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier KeyVaultArmId { get { throw null; } set { } } } - public partial class EncryptionProperty + public partial class MachineLearningEncryptionSetting { - public EncryptionProperty(Azure.ResourceManager.MachineLearning.Models.EncryptionStatus status, Azure.ResourceManager.MachineLearning.Models.EncryptionKeyVaultProperties keyVaultProperties) { } - public Azure.ResourceManager.MachineLearning.Models.EncryptionKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EncryptionStatus Status { get { throw null; } set { } } - public string UserAssignedIdentity { get { throw null; } set { } } + public MachineLearningEncryptionSetting(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus status, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties keyVaultProperties) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionKeyVaultProperties KeyVaultProperties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus Status { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier UserAssignedIdentity { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EncryptionStatus : System.IEquatable + public readonly partial struct MachineLearningEncryptionStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EncryptionStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EncryptionStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EncryptionStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EncryptionStatus other) { throw null; } + public MachineLearningEncryptionStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus 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.EncryptionStatus left, Azure.ResourceManager.MachineLearning.Models.EncryptionStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EncryptionStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EncryptionStatus left, Azure.ResourceManager.MachineLearning.Models.EncryptionStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEncryptionStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class EndpointAuthKeys + public partial class MachineLearningEndpointAuthKeys { - public EndpointAuthKeys() { } + public MachineLearningEndpointAuthKeys() { } public string PrimaryKey { get { throw null; } set { } } public string SecondaryKey { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EndpointAuthMode : System.IEquatable + public readonly partial struct MachineLearningEndpointAuthMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EndpointAuthMode(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode AADToken { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode AMLToken { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode Key { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode other) { throw null; } + public MachineLearningEndpointAuthMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode AADToken { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode AMLToken { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode Key { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode 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.EndpointAuthMode left, Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode left, Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode right) { throw null; } public override string ToString() { throw null; } } - public partial class EndpointAuthToken + public partial class MachineLearningEndpointAuthToken { - internal EndpointAuthToken() { } + internal MachineLearningEndpointAuthToken() { } public string AccessToken { get { throw null; } } public long? ExpiryTimeUtc { get { throw null; } } public long? RefreshAfterTimeUtc { get { throw null; } } public string TokenType { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EndpointComputeType : System.IEquatable + public readonly partial struct MachineLearningEndpointComputeType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EndpointComputeType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointComputeType AzureMLCompute { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointComputeType Kubernetes { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointComputeType Managed { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EndpointComputeType other) { throw null; } + public MachineLearningEndpointComputeType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType AzureMLCompute { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType Kubernetes { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType Managed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType 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.EndpointComputeType left, Azure.ResourceManager.MachineLearning.Models.EndpointComputeType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EndpointComputeType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EndpointComputeType left, Azure.ResourceManager.MachineLearning.Models.EndpointComputeType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointComputeType right) { throw null; } public override string ToString() { throw null; } } - public partial class EndpointDeploymentPropertiesBase + public partial class MachineLearningEndpointDeploymentProperties { - public EndpointDeploymentPropertiesBase() { } - public Azure.ResourceManager.MachineLearning.Models.CodeConfiguration CodeConfiguration { get { throw null; } set { } } + public MachineLearningEndpointDeploymentProperties() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningCodeConfiguration CodeConfiguration { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string EnvironmentId { get { throw null; } set { } } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } } - public partial class EndpointPropertiesBase + public partial class MachineLearningEndpointKeyRegenerateContent + { + public MachineLearningEndpointKeyRegenerateContent(Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType keyType) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType KeyType { get { throw null; } } + public string KeyValue { get { throw null; } set { } } + } + public partial class MachineLearningEndpointProperties { - public EndpointPropertiesBase(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode authMode) { } - public Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode AuthMode { get { throw null; } set { } } + public MachineLearningEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode AuthMode { get { throw null; } set { } } public string Description { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EndpointAuthKeys Keys { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthKeys Keys { get { throw null; } set { } } public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } public System.Uri ScoringUri { get { throw null; } } public System.Uri SwaggerUri { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EndpointProvisioningState : System.IEquatable + public readonly partial struct MachineLearningEndpointProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EndpointProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState other) { throw null; } + public MachineLearningEndpointProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState 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.EndpointProvisioningState left, Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState left, Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class EndpointScheduleAction : Azure.ResourceManager.MachineLearning.Models.ScheduleActionBase + public partial class MachineLearningEndpointScheduleAction : Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction { - public EndpointScheduleAction(System.BinaryData endpointInvocationDefinition) { } + public MachineLearningEndpointScheduleAction(System.BinaryData endpointInvocationDefinition) { } public System.BinaryData EndpointInvocationDefinition { get { throw null; } set { } } } - public partial class EnvironmentContainerProperties : Azure.ResourceManager.MachineLearning.Models.AssetContainer + public partial class MachineLearningEnvironmentContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { - public EnvironmentContainerProperties() { } + public MachineLearningEnvironmentContainerProperties() { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct EnvironmentType : System.IEquatable + public readonly partial struct MachineLearningEnvironmentType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public EnvironmentType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.EnvironmentType Curated { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.EnvironmentType UserCreated { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.EnvironmentType other) { throw null; } + public MachineLearningEnvironmentType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType Curated { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType UserCreated { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType 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.EnvironmentType left, Azure.ResourceManager.MachineLearning.Models.EnvironmentType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.EnvironmentType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.EnvironmentType left, Azure.ResourceManager.MachineLearning.Models.EnvironmentType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType right) { throw null; } public override string ToString() { throw null; } } - public partial class EnvironmentVersionProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase + public partial class MachineLearningEnvironmentVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { - public EnvironmentVersionProperties() { } + public MachineLearningEnvironmentVersionProperties() { } public Azure.ResourceManager.MachineLearning.Models.AutoRebuildSetting? AutoRebuild { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.BuildContext Build { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBuildContext Build { get { throw null; } set { } } public string CondaFile { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EnvironmentType? EnvironmentType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEnvironmentType? EnvironmentType { get { throw null; } } public string Image { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.InferenceContainerProperties InferenceConfig { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.OperatingSystemType? OSType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerProperties InferenceConfig { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType? OSType { get { throw null; } set { } } } - public partial class ErrorResponse + public partial class MachineLearningError { - internal ErrorResponse() { } + internal MachineLearningError() { } public Azure.ResponseError Error { get { throw null; } } } - public partial class EstimatedVmPrice + public partial class MachineLearningEstimatedVmPrice { - internal EstimatedVmPrice() { } - public Azure.ResourceManager.MachineLearning.Models.VmPriceOSType OSType { get { throw null; } } + internal MachineLearningEstimatedVmPrice() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType OSType { get { throw null; } } public double RetailPrice { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.VmTier VmTier { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier VmTier { get { throw null; } } } - public partial class EstimatedVmPrices + public partial class MachineLearningEstimatedVmPrices { - internal EstimatedVmPrices() { } - public Azure.ResourceManager.MachineLearning.Models.BillingCurrency BillingCurrency { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure UnitOfMeasure { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } + internal MachineLearningEstimatedVmPrices() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningBillingCurrency BillingCurrency { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure UnitOfMeasure { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Values { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FeatureLag : System.IEquatable + public readonly partial struct MachineLearningFeatureLag : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public FeatureLag(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.FeatureLag Auto { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FeatureLag None { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.FeatureLag other) { throw null; } + public MachineLearningFeatureLag(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag Auto { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag None { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag 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.FeatureLag left, Azure.ResourceManager.MachineLearning.Models.FeatureLag right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.FeatureLag (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.FeatureLag left, Azure.ResourceManager.MachineLearning.Models.FeatureLag right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeatureLag right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct FeaturizationMode : System.IEquatable + public readonly partial struct MachineLearningFeaturizationMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public FeaturizationMode(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.FeaturizationMode Auto { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FeaturizationMode Custom { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.FeaturizationMode Off { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.FeaturizationMode other) { throw null; } + public MachineLearningFeaturizationMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode Auto { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode Custom { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode Off { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode 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.FeaturizationMode left, Azure.ResourceManager.MachineLearning.Models.FeaturizationMode right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.FeaturizationMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.FeaturizationMode left, Azure.ResourceManager.MachineLearning.Models.FeaturizationMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode right) { throw null; } public override string ToString() { throw null; } } - public partial class FeaturizationSettings + public partial class MachineLearningFeaturizationSettings { - public FeaturizationSettings() { } + public MachineLearningFeaturizationSettings() { } public string DatasetLanguage { get { throw null; } set { } } } - public partial class FlavorData + public partial class MachineLearningFlavorData { - public FlavorData() { } + public MachineLearningFlavorData() { } public System.Collections.Generic.IDictionary Data { get { throw null; } set { } } } - public abstract partial class ForecastHorizon + public partial class MachineLearningFlowModelJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput { - protected ForecastHorizon() { } + public MachineLearningFlowModelJobInput(System.Uri uri) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } } - public partial class Forecasting : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + public partial class MachineLearningFlowModelJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { - public Forecasting(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ForecastingSettings ForecastingSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput TestData { get { throw null; } set { } } - public double? TestDataSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ForecastingTrainingSettings TrainingSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } - public string WeightColumnName { get { throw null; } set { } } + public MachineLearningFlowModelJobOutput() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ForecastingModel : System.IEquatable + public partial class MachineLearningFqdnEndpoint { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ForecastingModel(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Arimax { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel AutoArima { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Average { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel DecisionTree { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel ElasticNet { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel ExponentialSmoothing { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel ExtremeRandomTrees { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel GradientBoosting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel KNN { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel LassoLars { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel LightGBM { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Naive { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel Prophet { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel RandomForest { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel SeasonalAverage { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel SeasonalNaive { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel SGD { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel TCNForecaster { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingModel XGBoostRegressor { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ForecastingModel 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.ForecastingModel left, Azure.ResourceManager.MachineLearning.Models.ForecastingModel right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ForecastingModel (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ForecastingModel left, Azure.ResourceManager.MachineLearning.Models.ForecastingModel right) { throw null; } - public override string ToString() { throw null; } + internal MachineLearningFqdnEndpoint() { } + public string DomainName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EndpointDetails { get { throw null; } } + } + public partial class MachineLearningFqdnEndpointDetail + { + internal MachineLearningFqdnEndpointDetail() { } + public int? Port { get { throw null; } } + } + public partial class MachineLearningFqdnEndpoints + { + internal MachineLearningFqdnEndpoints() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFqdnEndpointsProperties Properties { get { throw null; } } + } + public partial class MachineLearningFqdnEndpointsProperties + { + internal MachineLearningFqdnEndpointsProperties() { } + public string Category { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Endpoints { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ForecastingPrimaryMetric : System.IEquatable + public readonly partial struct MachineLearningGoal : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ForecastingPrimaryMetric(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric NormalizedMeanAbsoluteError { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric NormalizedRootMeanSquaredError { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric R2Score { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric SpearmanCorrelation { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric other) { throw null; } + public MachineLearningGoal(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal Maximize { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal Minimize { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal 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.ForecastingPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ForecastingPrimaryMetric right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal left, Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal left, Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal right) { throw null; } public override string ToString() { throw null; } } - public partial class ForecastingSettings + public partial class MachineLearningHDInsightCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public ForecastingSettings() { } - public string CountryOrRegionForHolidays { get { throw null; } set { } } - public int? CvStepSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.FeatureLag? FeatureLags { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ForecastHorizon ForecastHorizon { get { throw null; } set { } } - public string Frequency { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.Seasonality Seasonality { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration? ShortSeriesHandlingConfig { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TargetAggregationFunction? TargetAggregateFunction { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TargetLags TargetLags { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TargetRollingWindowSize TargetRollingWindowSize { get { throw null; } set { } } - public string TimeColumnName { get { throw null; } set { } } - public System.Collections.Generic.IList TimeSeriesIdColumnNames { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.UseStl? UseStl { get { throw null; } set { } } + public MachineLearningHDInsightCompute() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningHDInsightProperties Properties { get { throw null; } set { } } } - public partial class ForecastingTrainingSettings : Azure.ResourceManager.MachineLearning.Models.TrainingSettings + public partial class MachineLearningHDInsightProperties { - public ForecastingTrainingSettings() { } - public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } - public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } + public MachineLearningHDInsightProperties() { } + public string Address { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSshCredentials AdministratorAccount { get { throw null; } set { } } + public int? SshPort { get { throw null; } set { } } } - public partial class FqdnEndpoint + public partial class MachineLearningIdAssetReference : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase { - internal FqdnEndpoint() { } - public string DomainName { get { throw null; } } - public System.Collections.Generic.IReadOnlyList EndpointDetails { get { throw null; } } + public MachineLearningIdAssetReference(Azure.Core.ResourceIdentifier assetId) { } + public Azure.Core.ResourceIdentifier AssetId { get { throw null; } set { } } } - public partial class FqdnEndpointDetail + public abstract partial class MachineLearningIdentityConfiguration { - internal FqdnEndpointDetail() { } - public int? Port { get { throw null; } } + protected MachineLearningIdentityConfiguration() { } } - public partial class FqdnEndpoints + public partial class MachineLearningInferenceContainerProperties { - internal FqdnEndpoints() { } - public Azure.ResourceManager.MachineLearning.Models.FqdnEndpointsProperties Properties { get { throw null; } } + public MachineLearningInferenceContainerProperties() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerRoute LivenessRoute { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerRoute ReadinessRoute { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInferenceContainerRoute ScoringRoute { get { throw null; } set { } } } - public partial class FqdnEndpointsProperties + public partial class MachineLearningInferenceContainerRoute { - internal FqdnEndpointsProperties() { } - public string Category { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Endpoints { get { throw null; } } + public MachineLearningInferenceContainerRoute(string path, int port) { } + public string Path { get { throw null; } set { } } + public int Port { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Goal : System.IEquatable + public readonly partial struct MachineLearningInputDeliveryMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public Goal(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.Goal Maximize { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Goal Minimize { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.Goal other) { throw null; } + public MachineLearningInputDeliveryMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode Direct { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode Download { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode EvalDownload { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode EvalMount { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode ReadOnlyMount { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode ReadWriteMount { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode 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.Goal left, Azure.ResourceManager.MachineLearning.Models.Goal right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.Goal (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.Goal left, Azure.ResourceManager.MachineLearning.Models.Goal right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode right) { throw null; } public override string ToString() { throw null; } } - public partial class GridSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm - { - public GridSamplingAlgorithm() { } - } - public partial class HDInsightCompute : Azure.ResourceManager.MachineLearning.Models.Compute + public partial class MachineLearningInstanceTypeSchema { - public HDInsightCompute() { } - public Azure.ResourceManager.MachineLearning.Models.HDInsightProperties Properties { get { throw null; } set { } } - } - public partial class HDInsightProperties - { - public HDInsightProperties() { } - public string Address { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.VirtualMachineSshCredentials AdministratorAccount { get { throw null; } set { } } - public int? SshPort { get { throw null; } set { } } + public MachineLearningInstanceTypeSchema() { } + public System.Collections.Generic.IDictionary NodeSelector { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInstanceTypeSchemaResources Resources { get { throw null; } set { } } } - public partial class IdAssetReference : Azure.ResourceManager.MachineLearning.Models.AssetReferenceBase + public partial class MachineLearningInstanceTypeSchemaResources { - public IdAssetReference(string assetId) { } - public string AssetId { get { throw null; } set { } } + public MachineLearningInstanceTypeSchemaResources() { } + public System.Collections.Generic.IDictionary Limits { get { throw null; } } + public System.Collections.Generic.IDictionary Requests { get { throw null; } } } - public abstract partial class IdentityConfiguration + public abstract partial class MachineLearningJobInput { - protected IdentityConfiguration() { } + protected MachineLearningJobInput() { } + public string Description { get { throw null; } set { } } } - public partial class ImageClassification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + public abstract partial class MachineLearningJobLimits { - public ImageClassification(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsClassification ModelSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } + protected MachineLearningJobLimits() { } + public System.TimeSpan? Timeout { get { throw null; } set { } } } - public partial class ImageClassificationMultilabel : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + public abstract partial class MachineLearningJobOutput { - public ImageClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsClassification ModelSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } + protected MachineLearningJobOutput() { } + public string Description { get { throw null; } set { } } } - public partial class ImageInstanceSegmentation : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + public partial class MachineLearningJobProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase { - public ImageInstanceSegmentation(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsObjectDetection ModelSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } + public MachineLearningJobProperties() { } + public string ComponentId { get { throw null; } set { } } + public string ComputeId { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public string ExperimentName { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration Identity { get { throw null; } set { } } + public bool? IsArchived { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Services { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus? Status { get { throw null; } } } - public partial class ImageLimitSettings + public partial class MachineLearningJobResourceConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceConfiguration { - public ImageLimitSettings() { } - public int? MaxConcurrentTrials { get { throw null; } set { } } - public int? MaxTrials { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } + public MachineLearningJobResourceConfiguration() { } + public string DockerArgs { get { throw null; } set { } } + public string ShmSize { get { throw null; } set { } } } - public partial class ImageModelDistributionSettings + public partial class MachineLearningJobScheduleAction : Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction { - public ImageModelDistributionSettings() { } - public string AmsGradient { get { throw null; } set { } } - public string Augmentations { get { throw null; } set { } } - public string Beta1 { get { throw null; } set { } } - public string Beta2 { get { throw null; } set { } } - public string Distributed { get { throw null; } set { } } - public string EarlyStopping { get { throw null; } set { } } - public string EarlyStoppingDelay { get { throw null; } set { } } - public string EarlyStoppingPatience { get { throw null; } set { } } - public string EnableOnnxNormalization { get { throw null; } set { } } - public string EvaluationFrequency { get { throw null; } set { } } - public string GradientAccumulationStep { get { throw null; } set { } } - public string LayersToFreeze { get { throw null; } set { } } - public string LearningRate { get { throw null; } set { } } - public string LearningRateScheduler { get { throw null; } set { } } - public string ModelName { get { throw null; } set { } } - public string Momentum { get { throw null; } set { } } - public string Nesterov { get { throw null; } set { } } - public string NumberOfEpochs { get { throw null; } set { } } - public string NumberOfWorkers { get { throw null; } set { } } - public string Optimizer { get { throw null; } set { } } - public string RandomSeed { get { throw null; } set { } } - public string StepLRGamma { get { throw null; } set { } } - public string StepLRStepSize { get { throw null; } set { } } - public string TrainingBatchSize { get { throw null; } set { } } - public string ValidationBatchSize { get { throw null; } set { } } - public string WarmupCosineLRCycles { get { throw null; } set { } } - public string WarmupCosineLRWarmupEpochs { get { throw null; } set { } } - public string WeightDecay { get { throw null; } set { } } + public MachineLearningJobScheduleAction(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties jobDefinition) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties JobDefinition { get { throw null; } set { } } } - public partial class ImageModelDistributionSettingsClassification : Azure.ResourceManager.MachineLearning.Models.ImageModelDistributionSettings + public partial class MachineLearningJobService { - public ImageModelDistributionSettingsClassification() { } - public string TrainingCropSize { get { throw null; } set { } } - public string ValidationCropSize { get { throw null; } set { } } - public string ValidationResizeSize { get { throw null; } set { } } - public string WeightedLoss { get { throw null; } set { } } + public MachineLearningJobService() { } + public string Endpoint { get { throw null; } set { } } + public string ErrorMessage { get { throw null; } } + public string JobServiceType { get { throw null; } set { } } + public int? Port { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } + public string Status { get { throw null; } } } - public partial class ImageModelDistributionSettingsObjectDetection : Azure.ResourceManager.MachineLearning.Models.ImageModelDistributionSettings + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningJobStatus : System.IEquatable { - public ImageModelDistributionSettingsObjectDetection() { } - public string BoxDetectionsPerImage { get { throw null; } set { } } - public string BoxScoreThreshold { get { throw null; } set { } } - public string ImageSize { get { throw null; } set { } } - public string MaxSize { get { throw null; } set { } } - public string MinSize { get { throw null; } set { } } - public string ModelSize { get { throw null; } set { } } - public string MultiScale { get { throw null; } set { } } - public string NmsIouThreshold { get { throw null; } set { } } - public string TileGridSize { get { throw null; } set { } } - public string TileOverlapRatio { get { throw null; } set { } } - public string TilePredictionsNmsThreshold { get { throw null; } set { } } - public string ValidationIouThreshold { get { throw null; } set { } } - public string ValidationMetricType { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningJobStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus CancelRequested { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Completed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Finalizing { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus NotResponding { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus NotStarted { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Paused { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Preparing { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Provisioning { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Queued { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Starting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus 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.MachineLearningJobStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningJobStatus right) { throw null; } + public override string ToString() { throw null; } } - public partial class ImageModelSettings + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningKeyType : System.IEquatable { - public ImageModelSettings() { } - public string AdvancedSettings { get { throw null; } set { } } - public bool? AmsGradient { get { throw null; } set { } } - public string Augmentations { get { throw null; } set { } } - public float? Beta1 { get { throw null; } set { } } - public float? Beta2 { get { throw null; } set { } } - public int? CheckpointFrequency { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLFlowModelJobInput CheckpointModel { get { throw null; } set { } } - public string CheckpointRunId { get { throw null; } set { } } - public bool? Distributed { get { throw null; } set { } } - public bool? EarlyStopping { get { throw null; } set { } } - public int? EarlyStoppingDelay { get { throw null; } set { } } - public int? EarlyStoppingPatience { get { throw null; } set { } } - public bool? EnableOnnxNormalization { get { throw null; } set { } } - public int? EvaluationFrequency { get { throw null; } set { } } - public int? GradientAccumulationStep { get { throw null; } set { } } - public int? LayersToFreeze { get { throw null; } set { } } - public float? LearningRate { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler? LearningRateScheduler { get { throw null; } set { } } - public string ModelName { get { throw null; } set { } } - public float? Momentum { get { throw null; } set { } } - public bool? Nesterov { get { throw null; } set { } } - public int? NumberOfEpochs { get { throw null; } set { } } - public int? NumberOfWorkers { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer? Optimizer { get { throw null; } set { } } - public int? RandomSeed { get { throw null; } set { } } - public float? StepLRGamma { get { throw null; } set { } } - public int? StepLRStepSize { get { throw null; } set { } } - public int? TrainingBatchSize { get { throw null; } set { } } - public int? ValidationBatchSize { get { throw null; } set { } } - public float? WarmupCosineLRCycles { get { throw null; } set { } } - public int? WarmupCosineLRWarmupEpochs { get { throw null; } set { } } - public float? WeightDecay { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningKeyType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType Primary { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType Secondary { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType 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.MachineLearningKeyType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningKeyType right) { throw null; } + public override string ToString() { throw null; } } - public partial class ImageModelSettingsClassification : Azure.ResourceManager.MachineLearning.Models.ImageModelSettings + public partial class MachineLearningKubernetesCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties { - public ImageModelSettingsClassification() { } - public int? TrainingCropSize { get { throw null; } set { } } - public int? ValidationCropSize { get { throw null; } set { } } - public int? ValidationResizeSize { get { throw null; } set { } } - public int? WeightedLoss { get { throw null; } set { } } + public MachineLearningKubernetesCompute() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningKubernetesProperties Properties { get { throw null; } set { } } } - public partial class ImageModelSettingsObjectDetection : Azure.ResourceManager.MachineLearning.Models.ImageModelSettings + public partial class MachineLearningKubernetesOnlineDeployment : Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties { - public ImageModelSettingsObjectDetection() { } - public int? BoxDetectionsPerImage { get { throw null; } set { } } - public float? BoxScoreThreshold { get { throw null; } set { } } - public int? ImageSize { get { throw null; } set { } } - public int? MaxSize { get { throw null; } set { } } - public int? MinSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ModelSize? ModelSize { get { throw null; } set { } } - public bool? MultiScale { get { throw null; } set { } } - public float? NmsIouThreshold { get { throw null; } set { } } - public string TileGridSize { get { throw null; } set { } } - public float? TileOverlapRatio { get { throw null; } set { } } - public float? TilePredictionsNmsThreshold { get { throw null; } set { } } - public float? ValidationIouThreshold { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ValidationMetricType? ValidationMetricType { get { throw null; } set { } } + public MachineLearningKubernetesOnlineDeployment() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerResourceRequirements ContainerResourceRequirements { get { throw null; } set { } } } - public partial class ImageObjectDetection : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + public partial class MachineLearningKubernetesProperties { - public ImageObjectDetection(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData, Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings limitSettings) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public Azure.ResourceManager.MachineLearning.Models.ImageLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageModelSettingsObjectDetection ModelSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public System.Collections.Generic.IList SearchSpace { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ImageSweepSettings SweepSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } + public MachineLearningKubernetesProperties() { } + public string DefaultInstanceType { get { throw null; } set { } } + public string ExtensionInstanceReleaseTrain { get { throw null; } set { } } + public string ExtensionPrincipalId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary InstanceTypes { get { throw null; } } + public string Namespace { get { throw null; } set { } } + public string RelayConnectionString { get { throw null; } set { } } + public string ServiceBusConnectionString { get { throw null; } set { } } + public string VcName { get { throw null; } set { } } } - public partial class ImageSweepSettings + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningListViewType : System.IEquatable { - public ImageSweepSettings(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType samplingAlgorithm) { } - public Azure.ResourceManager.MachineLearning.Models.EarlyTerminationPolicy EarlyTermination { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType SamplingAlgorithm { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningListViewType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType ActiveOnly { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType All { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType ArchivedOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType 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.MachineLearningListViewType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningListViewType right) { throw null; } + public override string ToString() { throw null; } } - public partial class InferenceContainerProperties + public partial class MachineLearningLiteralJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput { - public InferenceContainerProperties() { } - public Azure.ResourceManager.MachineLearning.Models.Route LivenessRoute { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.Route ReadinessRoute { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.Route ScoringRoute { get { throw null; } set { } } + public MachineLearningLiteralJobInput(string value) { } + public string Value { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct InputDeliveryMode : System.IEquatable + public readonly partial struct MachineLearningLoadBalancerType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public InputDeliveryMode(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode Direct { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode Download { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode EvalDownload { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode EvalMount { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode ReadOnlyMount { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode ReadWriteMount { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode other) { throw null; } + public MachineLearningLoadBalancerType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType InternalLoadBalancer { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType PublicIP { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType 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.InputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningLoadBalancerType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct InstanceSegmentationPrimaryMetric : System.IEquatable + public readonly partial struct MachineLearningLogVerbosity : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public InstanceSegmentationPrimaryMetric(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric MeanAveragePrecision { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric other) { throw null; } + public MachineLearningLogVerbosity(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity Critical { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity Debug { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity Error { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity Info { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity NotSet { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity 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.InstanceSegmentationPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.InstanceSegmentationPrimaryMetric right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity left, Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity left, Azure.ResourceManager.MachineLearning.Models.MachineLearningLogVerbosity right) { throw null; } public override string ToString() { throw null; } } - public partial class InstanceTypeSchema + public partial class MachineLearningManagedIdentity : Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration { - public InstanceTypeSchema() { } - public System.Collections.Generic.IDictionary NodeSelector { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.InstanceTypeSchemaResources Resources { get { throw null; } set { } } + public MachineLearningManagedIdentity() { } + public System.Guid? ClientId { get { throw null; } set { } } + public System.Guid? ObjectId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } } - public partial class InstanceTypeSchemaResources + public partial class MachineLearningManagedIdentityAuthTypeWorkspaceConnection : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties { - public InstanceTypeSchemaResources() { } - public System.Collections.Generic.IDictionary Limits { get { throw null; } } - public System.Collections.Generic.IDictionary Requests { get { throw null; } } + public MachineLearningManagedIdentityAuthTypeWorkspaceConnection() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionManagedIdentity Credentials { get { throw null; } set { } } } - public abstract partial class JobInput + public partial class MachineLearningManagedOnlineDeployment : Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineDeploymentProperties { - protected JobInput() { } - public string Description { get { throw null; } set { } } + public MachineLearningManagedOnlineDeployment() { } } - public abstract partial class JobLimits + public partial class MachineLearningModelContainerProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetContainer { - protected JobLimits() { } - public System.TimeSpan? Timeout { get { throw null; } set { } } + public MachineLearningModelContainerProperties() { } } - public abstract partial class JobOutput + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningModelSize : System.IEquatable { - protected JobOutput() { } - public string Description { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningModelSize(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize ExtraLarge { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize Large { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize Medium { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize Small { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize 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.MachineLearningModelSize left, Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize left, Azure.ResourceManager.MachineLearning.Models.MachineLearningModelSize right) { throw null; } + public override string ToString() { throw null; } } - public partial class JobResourceConfiguration : Azure.ResourceManager.MachineLearning.Models.ResourceConfiguration + public partial class MachineLearningModelVersionProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetBase { - public JobResourceConfiguration() { } - public string DockerArgs { get { throw null; } set { } } - public string ShmSize { get { throw null; } set { } } + public MachineLearningModelVersionProperties() { } + public System.Collections.Generic.IDictionary Flavors { get { throw null; } set { } } + public string JobName { get { throw null; } set { } } + public string ModelType { get { throw null; } set { } } + public System.Uri ModelUri { get { throw null; } set { } } } - public partial class JobScheduleAction : Azure.ResourceManager.MachineLearning.Models.ScheduleActionBase + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningMountAction : System.IEquatable { - public JobScheduleAction(Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties jobDefinition) { } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties JobDefinition { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningMountAction(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction Mount { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction Unmount { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction 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.MachineLearningMountAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountAction right) { throw null; } + public override string ToString() { throw null; } } - public partial class JobService + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningMountState : System.IEquatable { - public JobService() { } - public string Endpoint { get { throw null; } set { } } - public string ErrorMessage { get { throw null; } } - public string JobServiceType { get { throw null; } set { } } - public int? Port { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } - public string Status { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningMountState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState Mounted { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState MountFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState MountRequested { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState Unmounted { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState UnmountFailed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState UnmountRequested { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState 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.MachineLearningMountState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningMountState right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct JobStatus : System.IEquatable + public readonly partial struct MachineLearningNetwork : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public JobStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Canceled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus CancelRequested { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Completed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Finalizing { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus NotResponding { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus NotStarted { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Paused { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Preparing { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Provisioning { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Queued { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Running { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Starting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.JobStatus Unknown { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.JobStatus other) { throw null; } + public MachineLearningNetwork(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork Bridge { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork Host { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork 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.JobStatus left, Azure.ResourceManager.MachineLearning.Models.JobStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.JobStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.JobStatus left, Azure.ResourceManager.MachineLearning.Models.JobStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork left, Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork left, Azure.ResourceManager.MachineLearning.Models.MachineLearningNetwork right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct KeyType : System.IEquatable + public readonly partial struct MachineLearningNodeState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public KeyType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.KeyType Primary { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.KeyType Secondary { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.KeyType other) { throw null; } + public MachineLearningNodeState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState Idle { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState Leaving { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState Preempted { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState Preparing { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState Running { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState Unusable { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState 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.KeyType left, Azure.ResourceManager.MachineLearning.Models.KeyType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.KeyType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.KeyType left, Azure.ResourceManager.MachineLearning.Models.KeyType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningNodeState right) { throw null; } public override string ToString() { throw null; } } - public partial class KubernetesCompute : Azure.ResourceManager.MachineLearning.Models.Compute + public partial class MachineLearningNodeStateCounts { - public KubernetesCompute() { } - public Azure.ResourceManager.MachineLearning.Models.KubernetesProperties Properties { get { throw null; } set { } } + internal MachineLearningNodeStateCounts() { } + public int? IdleNodeCount { get { throw null; } } + public int? LeavingNodeCount { get { throw null; } } + public int? PreemptedNodeCount { get { throw null; } } + public int? PreparingNodeCount { get { throw null; } } + public int? RunningNodeCount { get { throw null; } } + public int? UnusableNodeCount { get { throw null; } } } - public partial class KubernetesOnlineDeployment : Azure.ResourceManager.MachineLearning.Models.OnlineDeploymentProperties + public partial class MachineLearningNoneAuthTypeWorkspaceConnection : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties { - public KubernetesOnlineDeployment() { } - public Azure.ResourceManager.MachineLearning.Models.ContainerResourceRequirements ContainerResourceRequirements { get { throw null; } set { } } + public MachineLearningNoneAuthTypeWorkspaceConnection() { } } - public partial class KubernetesProperties + public partial class MachineLearningNoneDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials { - public KubernetesProperties() { } - public string DefaultInstanceType { get { throw null; } set { } } - public string ExtensionInstanceReleaseTrain { get { throw null; } set { } } - public string ExtensionPrincipalId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary InstanceTypes { get { throw null; } } - public string Namespace { get { throw null; } set { } } - public string RelayConnectionString { get { throw null; } set { } } - public string ServiceBusConnectionString { get { throw null; } set { } } - public string VcName { get { throw null; } set { } } + public MachineLearningNoneDatastoreCredentials() { } + } + public partial class MachineLearningNotebookPreparationError + { + internal MachineLearningNotebookPreparationError() { } + public string ErrorMessage { get { throw null; } } + public int? StatusCode { get { throw null; } } + } + public partial class MachineLearningNotebookResourceInfo + { + internal MachineLearningNotebookResourceInfo() { } + public string Fqdn { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningNotebookPreparationError NotebookPreparationError { get { throw null; } } + public string ResourceId { get { throw null; } } + } + public partial class MachineLearningObjective + { + public MachineLearningObjective(Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal goal, string primaryMetric) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningGoal Goal { get { throw null; } set { } } + public string PrimaryMetric { get { throw null; } set { } } + } + public partial class MachineLearningOnlineDeploymentPatch : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatch + { + public MachineLearningOnlineDeploymentPatch() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuPatch Sku { get { throw null; } set { } } + } + public partial class MachineLearningOnlineDeploymentProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointDeploymentProperties + { + public MachineLearningOnlineDeploymentProperties() { } + public bool? AppInsightsEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEgressPublicNetworkAccessType? EgressPublicNetworkAccess { get { throw null; } set { } } + public string InstanceType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings LivenessProbe { get { throw null; } set { } } + public string Model { get { throw null; } set { } } + public string ModelMountPath { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDeploymentProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningProbeSettings ReadinessProbe { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineRequestSettings RequestSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings ScaleSettings { get { throw null; } set { } } + } + public partial class MachineLearningOnlineEndpointProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProperties + { + public MachineLearningOnlineEndpointProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode authMode) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointAuthMode)) { } + public string Compute { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEndpointProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType? PublicNetworkAccess { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Traffic { get { throw null; } set { } } + } + public partial class MachineLearningOnlineRequestSettings + { + public MachineLearningOnlineRequestSettings() { } + public int? MaxConcurrentRequestsPerInstance { get { throw null; } set { } } + public System.TimeSpan? MaxQueueWait { get { throw null; } set { } } + public System.TimeSpan? RequestTimeout { get { throw null; } set { } } + } + public abstract partial class MachineLearningOnlineScaleSettings + { + protected MachineLearningOnlineScaleSettings() { } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LearningRateScheduler : System.IEquatable + public readonly partial struct MachineLearningOperatingSystemType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public LearningRateScheduler(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler Step { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler WarmupCosine { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler other) { throw null; } + public MachineLearningOperatingSystemType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType Linux { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType 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.LearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler left, Azure.ResourceManager.MachineLearning.Models.LearningRateScheduler right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperatingSystemType right) { throw null; } public override string ToString() { throw null; } } - public partial class ListNotebookKeysResult - { - internal ListNotebookKeysResult() { } - public string PrimaryAccessKey { get { throw null; } } - public string SecondaryAccessKey { get { throw null; } } - } - public partial class ListStorageAccountKeysResult + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningOperationName : System.IEquatable { - internal ListStorageAccountKeysResult() { } - public string UserStorageKey { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningOperationName(string value) { throw null; } + 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 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; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName 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.MachineLearningOperationName left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationName right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ListViewType : System.IEquatable + public readonly partial struct MachineLearningOperationStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ListViewType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ListViewType ActiveOnly { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ListViewType All { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ListViewType ArchivedOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ListViewType other) { throw null; } + public MachineLearningOperationStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus CreateFailed { get { throw null; } } + 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 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; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus 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.ListViewType left, Azure.ResourceManager.MachineLearning.Models.ListViewType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ListViewType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ListViewType left, Azure.ResourceManager.MachineLearning.Models.ListViewType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class ListWorkspaceKeysResult + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningOperationTrigger : System.IEquatable { - internal ListWorkspaceKeysResult() { } - public string AppInsightsInstrumentationKey { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.RegistryListCredentialsResult ContainerRegistryCredentials { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ListNotebookKeysResult NotebookAccessKeys { get { throw null; } } - public string UserStorageKey { get { throw null; } } - public string UserStorageResourceId { get { throw null; } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningOperationTrigger(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger IdleShutdown { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger Schedule { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger User { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger 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.MachineLearningOperationTrigger left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOperationTrigger right) { throw null; } + public override string ToString() { throw null; } } - public partial class LiteralJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningOrderString : System.IEquatable { - public LiteralJobInput(string value) { } - public string Value { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningOrderString(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString CreatedAtAsc { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString CreatedAtDesc { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString UpdatedAtAsc { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString UpdatedAtDesc { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString 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.MachineLearningOrderString left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOrderString right) { throw null; } + public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LoadBalancerType : System.IEquatable + public readonly partial struct MachineLearningOSType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public LoadBalancerType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.LoadBalancerType InternalLoadBalancer { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LoadBalancerType PublicIP { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.LoadBalancerType other) { throw null; } + public MachineLearningOSType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType Linux { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType 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.LoadBalancerType left, Azure.ResourceManager.MachineLearning.Models.LoadBalancerType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.LoadBalancerType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LoadBalancerType left, Azure.ResourceManager.MachineLearning.Models.LoadBalancerType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOSType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct LogVerbosity : System.IEquatable + public readonly partial struct MachineLearningOutputDeliveryMode : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public LogVerbosity(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.LogVerbosity Critical { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LogVerbosity Debug { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LogVerbosity Error { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LogVerbosity Info { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LogVerbosity NotSet { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.LogVerbosity Warning { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.LogVerbosity other) { throw null; } + public MachineLearningOutputDeliveryMode(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode ReadWriteMount { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode Upload { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode 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.LogVerbosity left, Azure.ResourceManager.MachineLearning.Models.LogVerbosity right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.LogVerbosity (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.LogVerbosity left, Azure.ResourceManager.MachineLearning.Models.LogVerbosity right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode right) { throw null; } public override string ToString() { throw null; } } - public partial class MachineLearningComputePatch + public partial class MachineLearningOutputPathAssetReference : Azure.ResourceManager.MachineLearning.Models.MachineLearningAssetReferenceBase { - public MachineLearningComputePatch() { } - public Azure.ResourceManager.MachineLearning.Models.ScaleSettings ScaleSettings { get { throw null; } set { } } + public MachineLearningOutputPathAssetReference() { } + public string JobId { get { throw null; } set { } } + public string Path { get { throw null; } set { } } } - public partial class MachineLearningJobProperties : Azure.ResourceManager.MachineLearning.Models.ResourceBase + public partial class MachineLearningPartialManagedServiceIdentity { - public MachineLearningJobProperties() { } - public string ComponentId { get { throw null; } set { } } - public string ComputeId { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public string ExperimentName { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.IdentityConfiguration Identity { get { throw null; } set { } } - public bool? IsArchived { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Services { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.JobStatus? Status { get { throw null; } } + public MachineLearningPartialManagedServiceIdentity() { } + public Azure.ResourceManager.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + } + public partial class MachineLearningPasswordDetail + { + internal MachineLearningPasswordDetail() { } + public string Name { get { throw null; } } + public string Value { get { throw null; } } + } + public partial class MachineLearningPatAuthTypeWorkspaceConnection : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties + { + public MachineLearningPatAuthTypeWorkspaceConnection() { } + public string CredentialsPat { get { throw null; } set { } } + } + public partial class MachineLearningPipelineJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties + { + public MachineLearningPipelineJob() { } + public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Jobs { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public System.BinaryData Settings { get { throw null; } set { } } + public string SourceJobId { get { throw null; } set { } } + } + public partial class MachineLearningPrivateEndpoint + { + public MachineLearningPrivateEndpoint() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public Azure.Core.ResourceIdentifier SubnetArmId { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct MachineLearningPrivateEndpointConnectionProvisioningState : System.IEquatable @@ -2933,1246 +3393,1177 @@ public MachineLearningPrivateLinkServiceConnectionState() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } } - public partial class MachineLearningSku - { - public MachineLearningSku(string name) { } - public int? Capacity { get { throw null; } set { } } - public string Family { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string Size { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? Tier { get { throw null; } set { } } - } - public enum MachineLearningSkuTier - { - Free = 0, - Basic = 1, - Standard = 2, - Premium = 3, - } - public partial class MachineLearningUsage - { - internal MachineLearningUsage() { } - public string AmlWorkspaceLocation { get { throw null; } } - public long? CurrentValue { get { throw null; } } - public string Id { get { throw null; } } - public long? Limit { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.UsageName Name { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.UsageUnit? Unit { get { throw null; } } - public string UsageType { get { throw null; } } - } - public partial class MachineLearningWorkspacePatch - { - public MachineLearningWorkspacePatch() { } - 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 string FriendlyName { get { throw null; } set { } } - public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } - public string ImageBuildCompute { get { throw null; } set { } } - public string PrimaryUserAssignedIdentity { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class ManagedIdentity : Azure.ResourceManager.MachineLearning.Models.IdentityConfiguration - { - public ManagedIdentity() { } - public System.Guid? ClientId { get { throw null; } set { } } - public System.Guid? ObjectId { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } - } - public partial class ManagedIdentityAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 - { - public ManagedIdentityAuthTypeWorkspaceConnectionProperties() { } - public Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionManagedIdentity Credentials { get { throw null; } set { } } - } - public partial class ManagedOnlineDeployment : Azure.ResourceManager.MachineLearning.Models.OnlineDeploymentProperties + public partial class MachineLearningProbeSettings { - public ManagedOnlineDeployment() { } + public MachineLearningProbeSettings() { } + public int? FailureThreshold { get { throw null; } set { } } + public System.TimeSpan? InitialDelay { get { throw null; } set { } } + public System.TimeSpan? Period { get { throw null; } set { } } + public int? SuccessThreshold { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ManagedServiceIdentityType : System.IEquatable + public readonly partial struct MachineLearningProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ManagedServiceIdentityType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType SystemAssigned { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType SystemAssignedUserAssigned { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType UserAssigned { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType other) { throw null; } + public MachineLearningProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Unknown { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState 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.ManagedServiceIdentityType left, Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType left, Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningProvisioningState right) { throw null; } public override string ToString() { throw null; } } - public partial class MedianStoppingPolicy : Azure.ResourceManager.MachineLearning.Models.EarlyTerminationPolicy - { - public MedianStoppingPolicy() { } - } - public partial class MLFlowModelJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput - { - public MLFlowModelJobInput(System.Uri uri) { } - public Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class MLFlowModelJobOutput : Azure.ResourceManager.MachineLearning.Models.JobOutput - { - public MLFlowModelJobOutput() { } - public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class MLTableData : Azure.ResourceManager.MachineLearning.Models.DataVersionProperties - { - public MLTableData(System.Uri dataUri) : base (default(System.Uri)) { } - public System.Collections.Generic.IList ReferencedUris { get { throw null; } set { } } - } - public partial class MLTableJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput - { - public MLTableJobInput(System.Uri uri) { } - public Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class MLTableJobOutput : Azure.ResourceManager.MachineLearning.Models.JobOutput - { - public MLTableJobOutput() { } - public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class ModelContainerProperties : Azure.ResourceManager.MachineLearning.Models.AssetContainer - { - public ModelContainerProperties() { } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ModelSize : System.IEquatable + public readonly partial struct MachineLearningPublicNetworkAccess : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ModelSize(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ModelSize ExtraLarge { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ModelSize Large { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ModelSize Medium { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ModelSize None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ModelSize Small { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ModelSize other) { throw null; } + public MachineLearningPublicNetworkAccess(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess 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.ModelSize left, Azure.ResourceManager.MachineLearning.Models.ModelSize right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ModelSize (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ModelSize left, Azure.ResourceManager.MachineLearning.Models.ModelSize right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess left, Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess left, Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess right) { throw null; } public override string ToString() { throw null; } } - public partial class ModelVersionProperties : Azure.ResourceManager.MachineLearning.Models.AssetBase - { - public ModelVersionProperties() { } - public System.Collections.Generic.IDictionary Flavors { get { throw null; } set { } } - public string JobName { get { throw null; } set { } } - public string ModelType { get { throw null; } set { } } - public System.Uri ModelUri { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MountAction : System.IEquatable + public readonly partial struct MachineLearningPublicNetworkAccessType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public MountAction(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MountAction Mount { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountAction Unmount { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.MountAction other) { throw null; } + public MachineLearningPublicNetworkAccessType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType 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.MountAction left, Azure.ResourceManager.MachineLearning.Models.MountAction right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.MountAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MountAction left, Azure.ResourceManager.MachineLearning.Models.MountAction right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccessType right) { throw null; } public override string ToString() { throw null; } } + public partial class MachineLearningQuotaProperties + { + public MachineLearningQuotaProperties() { } + public string Id { get { throw null; } set { } } + public long? Limit { get { throw null; } set { } } + public string QuotaBasePropertiesType { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? Unit { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MountState : System.IEquatable + public readonly partial struct MachineLearningQuotaUnit : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public MountState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.MountState Mounted { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountState MountFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountState MountRequested { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountState Unmounted { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountState UnmountFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.MountState UnmountRequested { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.MountState other) { throw null; } + public MachineLearningQuotaUnit(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit Count { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit 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.MountState left, Azure.ResourceManager.MachineLearning.Models.MountState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.MountState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MountState left, Azure.ResourceManager.MachineLearning.Models.MountState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit left, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit left, Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit right) { throw null; } public override string ToString() { throw null; } } - public partial class Mpi : Azure.ResourceManager.MachineLearning.Models.DistributionConfiguration - { - public Mpi() { } - public int? ProcessCountPerInstance { get { throw null; } set { } } - } - public abstract partial class NCrossValidations + public partial class MachineLearningQuotaUpdateContent { - protected NCrossValidations() { } + public MachineLearningQuotaUpdateContent() { } + public Azure.Core.AzureLocation? Location { get { throw null; } set { } } + public System.Collections.Generic.IList Value { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Network : System.IEquatable + public readonly partial struct MachineLearningRecurrenceFrequency : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public Network(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.Network Bridge { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Network Host { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.Network other) { throw null; } + public MachineLearningRecurrenceFrequency(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency Day { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency Hour { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency Minute { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency Month { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency Week { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency 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.Network left, Azure.ResourceManager.MachineLearning.Models.Network right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.Network (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.Network left, Azure.ResourceManager.MachineLearning.Models.Network right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency left, Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency left, Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency right) { throw null; } public override string ToString() { throw null; } } - public partial class NlpVerticalLimitSettings + public partial class MachineLearningRecurrenceSchedule { - public NlpVerticalLimitSettings() { } - public int? MaxConcurrentTrials { get { throw null; } set { } } - public int? MaxTrials { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } + public MachineLearningRecurrenceSchedule(System.Collections.Generic.IEnumerable hours, System.Collections.Generic.IEnumerable minutes) { } + public System.Collections.Generic.IList Hours { get { throw null; } } + public System.Collections.Generic.IList Minutes { get { throw null; } } + public System.Collections.Generic.IList MonthDays { get { throw null; } set { } } + public System.Collections.Generic.IList WeekDays { get { throw null; } set { } } + } + public partial class MachineLearningRecurrenceTrigger : Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase + { + public MachineLearningRecurrenceTrigger(Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency frequency, int interval) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceFrequency Frequency { get { throw null; } set { } } + public int Interval { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningRecurrenceSchedule Schedule { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct NodeState : System.IEquatable + public readonly partial struct MachineLearningRemoteLoginPortPublicAccess : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public NodeState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.NodeState Idle { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.NodeState Leaving { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.NodeState Preempted { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.NodeState Preparing { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.NodeState Running { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.NodeState Unusable { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.NodeState other) { throw null; } + public MachineLearningRemoteLoginPortPublicAccess(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess Enabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess NotSpecified { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess 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.NodeState left, Azure.ResourceManager.MachineLearning.Models.NodeState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.NodeState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.NodeState left, Azure.ResourceManager.MachineLearning.Models.NodeState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess left, Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess left, Azure.ResourceManager.MachineLearning.Models.MachineLearningRemoteLoginPortPublicAccess right) { throw null; } public override string ToString() { throw null; } } - public partial class NodeStateCounts - { - internal NodeStateCounts() { } - public int? IdleNodeCount { get { throw null; } } - public int? LeavingNodeCount { get { throw null; } } - public int? PreemptedNodeCount { get { throw null; } } - public int? PreparingNodeCount { get { throw null; } } - public int? RunningNodeCount { get { throw null; } } - public int? UnusableNodeCount { get { throw null; } } - } - public partial class NoneAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 + public partial class MachineLearningResourceBase { - public NoneAuthTypeWorkspaceConnectionProperties() { } - } - public partial class NoneDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials - { - public NoneDatastoreCredentials() { } + public MachineLearningResourceBase() { } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } } - public partial class NotebookAccessTokenResult + public partial class MachineLearningResourceConfiguration { - internal NotebookAccessTokenResult() { } - public string AccessToken { get { throw null; } } - public int? ExpiresIn { get { throw null; } } - public string HostName { get { throw null; } } - public string NotebookResourceId { get { throw null; } } - public string PublicDns { get { throw null; } } - public string RefreshToken { get { throw null; } } - public string Scope { get { throw null; } } - public string TokenType { get { throw null; } } + public MachineLearningResourceConfiguration() { } + public int? InstanceCount { get { throw null; } set { } } + public string InstanceType { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } } - public partial class NotebookPreparationError + public partial class MachineLearningResourceName { - internal NotebookPreparationError() { } - public string ErrorMessage { get { throw null; } } - public int? StatusCode { get { throw null; } } + internal MachineLearningResourceName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } } - public partial class NotebookResourceInfo + public partial class MachineLearningResourcePatch { - internal NotebookResourceInfo() { } - public string Fqdn { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.NotebookPreparationError NotebookPreparationError { get { throw null; } } - public string ResourceId { get { throw null; } } + public MachineLearningResourcePatch() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ObjectDetectionPrimaryMetric : System.IEquatable + public partial class MachineLearningResourcePatchWithIdentity : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourcePatch { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ObjectDetectionPrimaryMetric(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric MeanAveragePrecision { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric 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.ObjectDetectionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric right) { throw null; } - public override string ToString() { throw null; } + public MachineLearningResourcePatchWithIdentity() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPartialManagedServiceIdentity Identity { get { throw null; } set { } } } - public partial class Objective + public partial class MachineLearningResourceQuota { - public Objective(Azure.ResourceManager.MachineLearning.Models.Goal goal, string primaryMetric) { } - public Azure.ResourceManager.MachineLearning.Models.Goal Goal { get { throw null; } set { } } - public string PrimaryMetric { get { throw null; } set { } } + internal MachineLearningResourceQuota() { } + public string AmlWorkspaceLocation { get { throw null; } } + public string Id { get { throw null; } } + public long? Limit { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceName Name { get { throw null; } } + public string ResourceQuotaType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? Unit { get { throw null; } } } - public partial class OnlineDeploymentPatch : Azure.ResourceManager.MachineLearning.Models.PartialMinimalTrackedResource + public partial class MachineLearningSasAuthTypeWorkspaceConnection : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties { - public OnlineDeploymentPatch() { } - public Azure.ResourceManager.MachineLearning.Models.PartialSku Sku { get { throw null; } set { } } + public MachineLearningSasAuthTypeWorkspaceConnection() { } + public string CredentialsSas { get { throw null; } set { } } } - public partial class OnlineDeploymentProperties : Azure.ResourceManager.MachineLearning.Models.EndpointDeploymentPropertiesBase + public partial class MachineLearningSasDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials { - public OnlineDeploymentProperties() { } - public bool? AppInsightsEnabled { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EgressPublicNetworkAccessType? EgressPublicNetworkAccess { get { throw null; } set { } } - public string InstanceType { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ProbeSettings LivenessProbe { get { throw null; } set { } } - public string Model { get { throw null; } set { } } - public string ModelMountPath { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DeploymentProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ProbeSettings ReadinessProbe { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.OnlineRequestSettings RequestSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.OnlineScaleSettings ScaleSettings { get { throw null; } set { } } + public MachineLearningSasDatastoreCredentials(Azure.ResourceManager.MachineLearning.Models.MachineLearningSasDatastoreSecrets secrets) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSasDatastoreSecrets Secrets { get { throw null; } set { } } } - public partial class OnlineEndpointProperties : Azure.ResourceManager.MachineLearning.Models.EndpointPropertiesBase + public partial class MachineLearningSasDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets { - public OnlineEndpointProperties(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode authMode) : base (default(Azure.ResourceManager.MachineLearning.Models.EndpointAuthMode)) { } - public string Compute { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.EndpointProvisioningState? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType? PublicNetworkAccess { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Traffic { get { throw null; } set { } } + public MachineLearningSasDatastoreSecrets() { } + public string SasToken { get { throw null; } set { } } } - public partial class OnlineRequestSettings + public abstract partial class MachineLearningScheduleAction { - public OnlineRequestSettings() { } - public int? MaxConcurrentRequestsPerInstance { get { throw null; } set { } } - public System.TimeSpan? MaxQueueWait { get { throw null; } set { } } - public System.TimeSpan? RequestTimeout { get { throw null; } set { } } + protected MachineLearningScheduleAction() { } } - public abstract partial class OnlineScaleSettings + public partial class MachineLearningScheduleBase { - protected OnlineScaleSettings() { } + internal MachineLearningScheduleBase() { } + public string Id { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState? ProvisioningStatus { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus? Status { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OperatingSystemType : System.IEquatable + public readonly partial struct MachineLearningScheduleListViewType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public OperatingSystemType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OperatingSystemType Linux { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperatingSystemType Windows { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OperatingSystemType other) { throw null; } + public MachineLearningScheduleListViewType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType All { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType DisabledOnly { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType EnabledOnly { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType 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.OperatingSystemType left, Azure.ResourceManager.MachineLearning.Models.OperatingSystemType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OperatingSystemType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OperatingSystemType left, Azure.ResourceManager.MachineLearning.Models.OperatingSystemType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleListViewType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OperationName : System.IEquatable + public partial class MachineLearningScheduleProperties : Azure.ResourceManager.MachineLearning.Models.MachineLearningResourceBase { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public OperationName(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OperationName Create { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationName Delete { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationName Reimage { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationName Restart { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationName Start { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationName Stop { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OperationName 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.OperationName left, Azure.ResourceManager.MachineLearning.Models.OperationName right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OperationName (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OperationName left, Azure.ResourceManager.MachineLearning.Models.OperationName right) { throw null; } - public override string ToString() { throw null; } + public MachineLearningScheduleProperties(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleAction action, Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase trigger) { } + 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 { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerBase Trigger { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OperationStatus : System.IEquatable + public readonly partial struct MachineLearningScheduleProvisioningState : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public OperationStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus CreateFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus DeleteFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus InProgress { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus ReimageFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus RestartFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus StartFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus StopFailed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationStatus Succeeded { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OperationStatus other) { throw null; } + public MachineLearningScheduleProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState Completed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState Provisioning { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState 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.OperationStatus left, Azure.ResourceManager.MachineLearning.Models.OperationStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OperationStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OperationStatus left, Azure.ResourceManager.MachineLearning.Models.OperationStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningState right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OperationTrigger : System.IEquatable + public readonly partial struct MachineLearningScheduleProvisioningStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public OperationTrigger(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OperationTrigger IdleShutdown { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationTrigger Schedule { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OperationTrigger User { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OperationTrigger other) { throw null; } + public MachineLearningScheduleProvisioningStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus Canceled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus Creating { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus Deleting { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus Failed { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus Succeeded { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus 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.OperationTrigger left, Azure.ResourceManager.MachineLearning.Models.OperationTrigger right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OperationTrigger (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OperationTrigger left, Azure.ResourceManager.MachineLearning.Models.OperationTrigger right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleProvisioningStatus right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OrderString : System.IEquatable + public readonly partial struct MachineLearningScheduleStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public OrderString(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OrderString CreatedAtAsc { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OrderString CreatedAtDesc { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OrderString UpdatedAtAsc { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OrderString UpdatedAtDesc { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OrderString other) { throw null; } + public MachineLearningScheduleStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus 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.OrderString left, Azure.ResourceManager.MachineLearning.Models.OrderString right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OrderString (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OrderString left, Azure.ResourceManager.MachineLearning.Models.OrderString right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningScheduleStatus right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OSType : System.IEquatable + public partial class MachineLearningScriptReference { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public OSType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OSType Linux { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OSType Windows { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OSType 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.OSType left, Azure.ResourceManager.MachineLearning.Models.OSType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OSType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OSType left, Azure.ResourceManager.MachineLearning.Models.OSType right) { throw null; } - public override string ToString() { throw null; } + public MachineLearningScriptReference() { } + public string ScriptArguments { get { throw null; } set { } } + public string ScriptData { get { throw null; } set { } } + public string ScriptSource { get { throw null; } set { } } + public string Timeout { get { throw null; } set { } } + } + public partial class MachineLearningScriptsToExecute + { + public MachineLearningScriptsToExecute() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScriptReference CreationScript { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningScriptReference StartupScript { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct OutputDeliveryMode : System.IEquatable + public readonly partial struct MachineLearningServiceDataAccessAuthIdentity : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public OutputDeliveryMode(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode ReadWriteMount { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode Upload { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode other) { throw null; } + public MachineLearningServiceDataAccessAuthIdentity(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity WorkspaceSystemAssignedIdentity { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity WorkspaceUserAssignedIdentity { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity 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.OutputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode left, Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity left, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity left, Azure.ResourceManager.MachineLearning.Models.MachineLearningServiceDataAccessAuthIdentity right) { throw null; } public override string ToString() { throw null; } } - public partial class OutputPathAssetReference : Azure.ResourceManager.MachineLearning.Models.AssetReferenceBase + public partial class MachineLearningServicePrincipalDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreCredentials { - public OutputPathAssetReference() { } - public string JobId { get { throw null; } set { } } - public string Path { get { throw null; } set { } } + public MachineLearningServicePrincipalDatastoreCredentials(System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.MachineLearningServicePrincipalDatastoreSecrets secrets, System.Guid tenantId) { } + public System.Uri AuthorityUri { get { throw null; } set { } } + public System.Guid ClientId { get { throw null; } set { } } + public System.Uri ResourceUri { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningServicePrincipalDatastoreSecrets Secrets { get { throw null; } set { } } + public System.Guid TenantId { get { throw null; } set { } } } - public partial class PartialManagedServiceIdentity + public partial class MachineLearningServicePrincipalDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningDatastoreSecrets { - public PartialManagedServiceIdentity() { } - public Azure.ResourceManager.MachineLearning.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get { throw null; } set { } } - public System.Collections.Generic.IDictionary UserAssignedIdentities { get { throw null; } } + public MachineLearningServicePrincipalDatastoreSecrets() { } + public string ClientSecret { get { throw null; } set { } } } - public partial class PartialMinimalTrackedResource + public partial class MachineLearningSharedPrivateLinkResource { - public PartialMinimalTrackedResource() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public MachineLearningSharedPrivateLinkResource() { } + public string GroupId { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier PrivateLinkResourceId { get { throw null; } set { } } + public string RequestMessage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } } - public partial class PartialMinimalTrackedResourceWithIdentity : Azure.ResourceManager.MachineLearning.Models.PartialMinimalTrackedResource + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MachineLearningShortSeriesHandlingConfiguration : System.IEquatable { - public PartialMinimalTrackedResourceWithIdentity() { } - public Azure.ResourceManager.MachineLearning.Models.PartialManagedServiceIdentity Identity { get { throw null; } set { } } + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MachineLearningShortSeriesHandlingConfiguration(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration Auto { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration Drop { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration Pad { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration 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.MachineLearningShortSeriesHandlingConfiguration left, Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration left, Azure.ResourceManager.MachineLearning.Models.MachineLearningShortSeriesHandlingConfiguration right) { throw null; } + public override string ToString() { throw null; } } - public partial class PartialSku + public partial class MachineLearningSku { - public PartialSku() { } + public MachineLearningSku(string name) { } public int? Capacity { get { throw null; } set { } } public string Family { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string Size { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? Tier { get { throw null; } set { } } } - public partial class PasswordDetail - { - internal PasswordDetail() { } - public string Name { get { throw null; } } - public string Value { get { throw null; } } - } - public partial class PATAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 - { - public PATAuthTypeWorkspaceConnectionProperties() { } - public string CredentialsPat { get { throw null; } set { } } - } - public partial class PipelineJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties + public partial class MachineLearningSkuCapacity { - public PipelineJob() { } - public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Jobs { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } - public System.BinaryData Settings { get { throw null; } set { } } - public string SourceJobId { get { throw null; } set { } } + internal MachineLearningSkuCapacity() { } + public int? Default { get { throw null; } } + public int? Maximum { get { throw null; } } + public int? Minimum { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType? ScaleType { get { throw null; } } } - public partial class PrivateEndpoint + public partial class MachineLearningSkuDetail { - public PrivateEndpoint() { } - public string Id { get { throw null; } } - public string SubnetArmId { get { throw null; } } + internal MachineLearningSkuDetail() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuCapacity Capacity { get { throw null; } } + public string ResourceType { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuSetting Sku { get { throw null; } } } - public partial class ProbeSettings + public partial class MachineLearningSkuPatch { - public ProbeSettings() { } - public int? FailureThreshold { get { throw null; } set { } } - public System.TimeSpan? InitialDelay { get { throw null; } set { } } - public System.TimeSpan? Period { get { throw null; } set { } } - public int? SuccessThreshold { get { throw null; } set { } } - public System.TimeSpan? Timeout { get { throw null; } set { } } + public MachineLearningSkuPatch() { } + public int? Capacity { get { throw null; } set { } } + public string Family { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Size { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? Tier { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningState : System.IEquatable + public readonly partial struct MachineLearningSkuScaleType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Canceled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Creating { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Deleting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Succeeded { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Unknown { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningState Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ProvisioningState other) { throw null; } + public MachineLearningSkuScaleType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType Automatic { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType Manual { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType 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.ProvisioningState left, Azure.ResourceManager.MachineLearning.Models.ProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ProvisioningState left, Azure.ResourceManager.MachineLearning.Models.ProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuScaleType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ProvisioningStatus : System.IEquatable + public partial class MachineLearningSkuSetting { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ProvisioningStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus Completed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus Provisioning { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus 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.ProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.ProvisioningStatus right) { throw null; } - public override string ToString() { throw null; } + internal MachineLearningSkuSetting() { } + public string Name { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? Tier { get { throw null; } } + } + public enum MachineLearningSkuTier + { + Free = 0, + Basic = 1, + Standard = 2, + Premium = 3, } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PublicNetworkAccess : System.IEquatable + public readonly partial struct MachineLearningSourceType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - 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; } + public MachineLearningSourceType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType Dataset { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType Datastore { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType Uri { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType 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.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 static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSourceType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct PublicNetworkAccessType : System.IEquatable + public readonly partial struct MachineLearningSshPublicAccess : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public PublicNetworkAccessType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType other) { throw null; } + public MachineLearningSshPublicAccess(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess 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.PublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType left, Azure.ResourceManager.MachineLearning.Models.PublicNetworkAccessType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSshPublicAccess right) { throw null; } public override string ToString() { throw null; } } - public partial class PyTorch : Azure.ResourceManager.MachineLearning.Models.DistributionConfiguration - { - public PyTorch() { } - public int? ProcessCountPerInstance { get { throw null; } set { } } - } - public partial class QuotaBaseProperties - { - public QuotaBaseProperties() { } - public string Id { get { throw null; } set { } } - public long? Limit { get { throw null; } set { } } - public string QuotaBasePropertiesType { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.QuotaUnit? Unit { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct QuotaUnit : System.IEquatable + public readonly partial struct MachineLearningSslConfigStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public QuotaUnit(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.QuotaUnit Count { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.QuotaUnit other) { throw null; } + public MachineLearningSslConfigStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus Auto { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus Disabled { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus Enabled { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus 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.QuotaUnit left, Azure.ResourceManager.MachineLearning.Models.QuotaUnit right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.QuotaUnit (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.QuotaUnit left, Azure.ResourceManager.MachineLearning.Models.QuotaUnit right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus right) { throw null; } public override string ToString() { throw null; } } - public partial class QuotaUpdateContent + public partial class MachineLearningSslConfiguration { - public QuotaUpdateContent() { } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public System.Collections.Generic.IList Value { get { throw null; } } + public MachineLearningSslConfiguration() { } + public string Cert { get { throw null; } set { } } + public string Cname { get { throw null; } set { } } + public string Key { get { throw null; } set { } } + public string LeafDomainLabel { get { throw null; } set { } } + public bool? OverwriteExistingDomain { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSslConfigStatus? Status { get { throw null; } set { } } } - public partial class RandomSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm + public partial class MachineLearningStackEnsembleSettings { - public RandomSamplingAlgorithm() { } - public Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule? Rule { get { throw null; } set { } } - public int? Seed { get { throw null; } set { } } + public MachineLearningStackEnsembleSettings() { } + public System.BinaryData StackMetaLearnerKWargs { get { throw null; } set { } } + public double? StackMetaLearnerTrainPercentage { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType? StackMetaLearnerType { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RandomSamplingAlgorithmRule : System.IEquatable + public readonly partial struct MachineLearningStackMetaLearnerType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public RandomSamplingAlgorithmRule(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule Random { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule Sobol { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule other) { throw null; } + public MachineLearningStackMetaLearnerType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType ElasticNet { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType ElasticNetCV { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType LightGBMClassifier { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType LightGBMRegressor { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType LinearRegression { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType LogisticRegression { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType LogisticRegressionCV { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType 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.RandomSamplingAlgorithmRule left, Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule left, Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningStackMetaLearnerType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RecurrenceFrequency : System.IEquatable + public readonly partial struct MachineLearningStorageAccountType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public RecurrenceFrequency(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency Day { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency Hour { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency Minute { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency Month { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency Week { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency other) { throw null; } + public MachineLearningStorageAccountType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType PremiumLrs { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType StandardLrs { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType 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.RecurrenceFrequency left, Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency left, Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningStorageAccountType right) { throw null; } public override string ToString() { throw null; } } - public partial class RecurrenceSchedule + public partial class MachineLearningSweepJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties + { + public MachineLearningSweepJob(Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective objective, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm, System.BinaryData searchSpace, Azure.ResourceManager.MachineLearning.Models.TrialComponent 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 { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningObjective Objective { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm SamplingAlgorithm { get { throw null; } set { } } + public System.BinaryData SearchSpace { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.TrialComponent Trial { get { throw null; } set { } } + } + public partial class MachineLearningSweepJobLimits : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobLimits + { + public MachineLearningSweepJobLimits() { } + public int? MaxConcurrentTrials { get { throw null; } set { } } + public int? MaxTotalTrials { get { throw null; } set { } } + public System.TimeSpan? TrialTimeout { get { throw null; } set { } } + } + public partial class MachineLearningSynapseSpark : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties + { + public MachineLearningSynapseSpark() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSynapseSparkProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningSynapseSparkProperties + { + public MachineLearningSynapseSparkProperties() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAutoPauseProperties AutoPauseProperties { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningAutoScaleProperties AutoScaleProperties { get { throw null; } set { } } + public int? NodeCount { get { throw null; } set { } } + public string NodeSize { get { throw null; } set { } } + public string NodeSizeFamily { get { throw null; } set { } } + public string PoolName { get { throw null; } set { } } + public string ResourceGroup { get { throw null; } set { } } + public string SparkVersion { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public string WorkspaceName { get { throw null; } set { } } + } + public partial class MachineLearningTable : Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties + { + public MachineLearningTable(System.Uri dataUri) : base (default(System.Uri)) { } + public System.Collections.Generic.IList ReferencedUris { get { throw null; } set { } } + } + public partial class MachineLearningTableJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput { - public RecurrenceSchedule(System.Collections.Generic.IEnumerable hours, System.Collections.Generic.IEnumerable minutes) { } - public System.Collections.Generic.IList Hours { get { throw null; } } - public System.Collections.Generic.IList Minutes { get { throw null; } } - public System.Collections.Generic.IList MonthDays { get { throw null; } set { } } - public System.Collections.Generic.IList WeekDays { get { throw null; } set { } } + public MachineLearningTableJobInput(System.Uri uri) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } } - public partial class RecurrenceTrigger : Azure.ResourceManager.MachineLearning.Models.TriggerBase + public partial class MachineLearningTableJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { - public RecurrenceTrigger(Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency frequency, int interval) { } - public Azure.ResourceManager.MachineLearning.Models.RecurrenceFrequency Frequency { get { throw null; } set { } } - public int Interval { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RecurrenceSchedule Schedule { get { throw null; } set { } } + public MachineLearningTableJobOutput() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } } - public partial class RegenerateEndpointKeysContent + public partial class MachineLearningTargetUtilizationScaleSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningOnlineScaleSettings { - public RegenerateEndpointKeysContent(Azure.ResourceManager.MachineLearning.Models.KeyType keyType) { } - public Azure.ResourceManager.MachineLearning.Models.KeyType KeyType { get { throw null; } } - public string KeyValue { get { throw null; } set { } } + public MachineLearningTargetUtilizationScaleSettings() { } + public int? MaxInstances { get { throw null; } set { } } + public int? MinInstances { get { throw null; } set { } } + public System.TimeSpan? PollingInterval { get { throw null; } set { } } + public int? TargetUtilizationPercentage { get { throw null; } set { } } } - public partial class RegistryListCredentialsResult + public partial class MachineLearningTrainingSettings { - internal RegistryListCredentialsResult() { } - public Azure.Core.AzureLocation? Location { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Passwords { get { throw null; } } - public string Username { get { throw null; } } + public MachineLearningTrainingSettings() { } + public System.TimeSpan? EnsembleModelDownloadTimeout { get { throw null; } set { } } + public bool? IsDnnTrainingEnabled { get { throw null; } set { } } + public bool? IsModelExplainabilityEnabled { get { throw null; } set { } } + public bool? IsOnnxCompatibleModelsEnabled { get { throw null; } set { } } + public bool? IsStackEnsembleEnabled { get { throw null; } set { } } + public bool? IsVoteEnsembleEnabled { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningStackEnsembleSettings StackEnsembleSettings { get { throw null; } set { } } } - public partial class Regression : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical + public abstract partial class MachineLearningTriggerBase { - public Regression(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } - public System.Collections.Generic.IList CvSplitColumnNames { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TableVerticalFeaturizationSettings FeaturizationSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TableVerticalLimitSettings LimitSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.NCrossValidations NCrossValidations { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput TestData { get { throw null; } set { } } - public double? TestDataSize { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.RegressionTrainingSettings TrainingSettings { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - public double? ValidationDataSize { get { throw null; } set { } } - public string WeightColumnName { get { throw null; } set { } } + protected MachineLearningTriggerBase() { } + public string EndTime { get { throw null; } set { } } + public string StartTime { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RegressionModel : System.IEquatable + public readonly partial struct MachineLearningTriggerType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public RegressionModel(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel DecisionTree { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel ElasticNet { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel ExtremeRandomTrees { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel GradientBoosting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel KNN { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel LassoLars { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel LightGBM { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel RandomForest { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel SGD { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionModel XGBoostRegressor { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RegressionModel other) { throw null; } + public MachineLearningTriggerType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType Cron { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType Recurrence { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType 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.RegressionModel left, Azure.ResourceManager.MachineLearning.Models.RegressionModel right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RegressionModel (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RegressionModel left, Azure.ResourceManager.MachineLearning.Models.RegressionModel right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningTriggerType right) { throw null; } public override string ToString() { throw null; } } + public partial class MachineLearningTritonModelJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput + { + public MachineLearningTritonModelJobInput(System.Uri uri) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class MachineLearningTritonModelJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput + { + public MachineLearningTritonModelJobOutput() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RegressionPrimaryMetric : System.IEquatable + public readonly partial struct MachineLearningUnderlyingResourceAction : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public RegressionPrimaryMetric(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric NormalizedMeanAbsoluteError { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric NormalizedRootMeanSquaredError { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric R2Score { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric SpearmanCorrelation { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric other) { throw null; } + public MachineLearningUnderlyingResourceAction(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction Delete { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction Detach { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction 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.RegressionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.RegressionPrimaryMetric right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUnderlyingResourceAction right) { throw null; } public override string ToString() { throw null; } } - public partial class RegressionTrainingSettings : Azure.ResourceManager.MachineLearning.Models.TrainingSettings - { - public RegressionTrainingSettings() { } - public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } - public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RemoteLoginPortPublicAccess : System.IEquatable + public readonly partial struct MachineLearningUnitOfMeasure : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public RemoteLoginPortPublicAccess(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess Enabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess NotSpecified { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess other) { throw null; } + public MachineLearningUnitOfMeasure(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure OneHour { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure 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.RemoteLoginPortPublicAccess left, Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess left, Azure.ResourceManager.MachineLearning.Models.RemoteLoginPortPublicAccess right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUnitOfMeasure right) { throw null; } public override string ToString() { throw null; } } - public partial class ResourceBase + public partial class MachineLearningUriFileDataVersion : Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties { - public ResourceBase() { } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } set { } } + public MachineLearningUriFileDataVersion(System.Uri dataUri) : base (default(System.Uri)) { } } - public partial class ResourceConfiguration + public partial class MachineLearningUriFileJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput { - public ResourceConfiguration() { } - public int? InstanceCount { get { throw null; } set { } } - public string InstanceType { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } set { } } + public MachineLearningUriFileJobInput(System.Uri uri) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } } - public partial class ResourceName + public partial class MachineLearningUriFileJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput { - internal ResourceName() { } - public string LocalizedValue { get { throw null; } } - public string Value { get { throw null; } } + public MachineLearningUriFileJobOutput() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class MachineLearningUriFolderDataVersion : Azure.ResourceManager.MachineLearning.Models.MachineLearningDataVersionProperties + { + public MachineLearningUriFolderDataVersion(System.Uri dataUri) : base (default(System.Uri)) { } + } + public partial class MachineLearningUriFolderJobInput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobInput + { + public MachineLearningUriFolderJobInput(System.Uri uri) { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningInputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } + } + public partial class MachineLearningUriFolderJobOutput : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobOutput + { + public MachineLearningUriFolderJobOutput() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningOutputDeliveryMode? Mode { get { throw null; } set { } } + public System.Uri Uri { get { throw null; } set { } } } - public partial class ResourceQuota + public partial class MachineLearningUsage { - internal ResourceQuota() { } + internal MachineLearningUsage() { } public string AmlWorkspaceLocation { get { throw null; } } + public long? CurrentValue { get { throw null; } } public string Id { get { throw null; } } public long? Limit { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ResourceName Name { get { throw null; } } - public string ResourceQuotaType { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.QuotaUnit? Unit { get { throw null; } } - } - public partial class Route - { - public Route(string path, int port) { } - public string Path { get { throw null; } set { } } - public int Port { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageName Name { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit? Unit { get { throw null; } } + public string UsageType { get { throw null; } } } - public abstract partial class SamplingAlgorithm + public partial class MachineLearningUsageName { - protected SamplingAlgorithm() { } + internal MachineLearningUsageName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SamplingAlgorithmType : System.IEquatable + public readonly partial struct MachineLearningUsageUnit : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SamplingAlgorithmType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType Bayesian { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType Grid { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType Random { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType other) { throw null; } + public MachineLearningUsageUnit(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit Count { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit 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.SamplingAlgorithmType left, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType left, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUsageUnit right) { throw null; } public override string ToString() { throw null; } } - public partial class SASAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 - { - public SASAuthTypeWorkspaceConnectionProperties() { } - public string CredentialsSas { get { throw null; } set { } } - } - public partial class SasDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials - { - public SasDatastoreCredentials(Azure.ResourceManager.MachineLearning.Models.SasDatastoreSecrets secrets) { } - public Azure.ResourceManager.MachineLearning.Models.SasDatastoreSecrets Secrets { get { throw null; } set { } } - } - public partial class SasDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.DatastoreSecrets + public partial class MachineLearningUserAccountCredentials { - public SasDatastoreSecrets() { } - public string SasToken { get { throw null; } set { } } + public MachineLearningUserAccountCredentials(string adminUserName) { } + public string AdminUserName { get { throw null; } set { } } + public string AdminUserPassword { get { throw null; } set { } } + public string AdminUserSshPublicKey { get { throw null; } set { } } } - public partial class ScaleSettings + public partial class MachineLearningUserFeature { - public ScaleSettings(int maxNodeCount) { } - public int MaxNodeCount { get { throw null; } set { } } - public int? MinNodeCount { get { throw null; } set { } } - public System.TimeSpan? NodeIdleTimeBeforeScaleDown { get { throw null; } set { } } + internal MachineLearningUserFeature() { } + public string Description { get { throw null; } } + public string DisplayName { get { throw null; } } + public string Id { get { throw null; } } } - public abstract partial class ScheduleActionBase + public partial class MachineLearningUserIdentity : Azure.ResourceManager.MachineLearning.Models.MachineLearningIdentityConfiguration { - protected ScheduleActionBase() { } + public MachineLearningUserIdentity() { } } - public partial class ScheduleBase + public partial class MachineLearningUsernamePasswordAuthTypeWorkspaceConnection : Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionProperties { - internal ScheduleBase() { } - public string Id { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState? ProvisioningStatus { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.ScheduleStatus? Status { get { throw null; } } + public MachineLearningUsernamePasswordAuthTypeWorkspaceConnection() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceConnectionUsernamePassword Credentials { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ScheduleListViewType : System.IEquatable + public readonly partial struct MachineLearningUseStl : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ScheduleListViewType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType All { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType DisabledOnly { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType EnabledOnly { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType other) { throw null; } + public MachineLearningUseStl(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl None { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl Season { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl SeasonTrend { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl 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.ScheduleListViewType left, Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType left, Azure.ResourceManager.MachineLearning.Models.ScheduleListViewType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl left, Azure.ResourceManager.MachineLearning.Models.MachineLearningUseStl right) { throw null; } public override string ToString() { throw null; } } - public partial class ScheduleProperties : Azure.ResourceManager.MachineLearning.Models.ResourceBase - { - public ScheduleProperties(Azure.ResourceManager.MachineLearning.Models.ScheduleActionBase action, Azure.ResourceManager.MachineLearning.Models.TriggerBase trigger) { } - public Azure.ResourceManager.MachineLearning.Models.ScheduleActionBase Action { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public bool? IsEnabled { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus? ProvisioningState { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.TriggerBase Trigger { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ScheduleProvisioningState : System.IEquatable + public readonly partial struct MachineLearningValueFormat : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ScheduleProvisioningState(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState Completed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState Provisioning { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState other) { throw null; } + public MachineLearningValueFormat(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat Json { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat 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.ScheduleProvisioningState left, Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState left, Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningState right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat left, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat left, Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat right) { throw null; } public override string ToString() { throw null; } } + public partial class MachineLearningVirtualMachineCompute : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeProperties + { + public MachineLearningVirtualMachineCompute() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVirtualMachineProperties Properties { get { throw null; } set { } } + } + public partial class MachineLearningVirtualMachineProperties + { + public MachineLearningVirtualMachineProperties() { } + public string Address { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSshCredentials AdministratorAccount { get { throw null; } set { } } + public bool? IsNotebookInstanceCompute { get { throw null; } set { } } + public int? NotebookServerPort { get { throw null; } set { } } + public int? SshPort { get { throw null; } set { } } + public string VirtualMachineSize { get { throw null; } set { } } + } + public partial class MachineLearningVirtualMachineSecrets : Azure.ResourceManager.MachineLearning.Models.MachineLearningComputeSecrets + { + internal MachineLearningVirtualMachineSecrets() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningVmSshCredentials AdministratorAccount { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ScheduleProvisioningStatus : System.IEquatable + public readonly partial struct MachineLearningVmPriceOSType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ScheduleProvisioningStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus Canceled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus Creating { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus Deleting { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus Failed { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus Succeeded { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus Updating { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus other) { throw null; } + public MachineLearningVmPriceOSType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType Linux { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType Windows { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType 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.ScheduleProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus left, Azure.ResourceManager.MachineLearning.Models.ScheduleProvisioningStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriceOSType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ScheduleStatus : System.IEquatable + public readonly partial struct MachineLearningVmPriority : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ScheduleStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ScheduleStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ScheduleStatus other) { throw null; } + public MachineLearningVmPriority(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority Dedicated { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority LowPriority { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority 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.ScheduleStatus left, Azure.ResourceManager.MachineLearning.Models.ScheduleStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ScheduleStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ScheduleStatus left, Azure.ResourceManager.MachineLearning.Models.ScheduleStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmPriority right) { throw null; } public override string ToString() { throw null; } } - public partial class ScriptReference - { - public ScriptReference() { } - public string ScriptArguments { get { throw null; } set { } } - public string ScriptData { get { throw null; } set { } } - public string ScriptSource { get { throw null; } set { } } - public string Timeout { get { throw null; } set { } } - } - public partial class ScriptsToExecute + public partial class MachineLearningVmSize { - public ScriptsToExecute() { } - public Azure.ResourceManager.MachineLearning.Models.ScriptReference CreationScript { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ScriptReference StartupScript { get { throw null; } set { } } + internal MachineLearningVmSize() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningEstimatedVmPrices EstimatedVmPrices { get { throw null; } } + public string Family { get { throw null; } } + public int? Gpus { get { throw null; } } + public bool? LowPriorityCapable { get { throw null; } } + public int? MaxResourceVolumeMB { get { throw null; } } + public double? MemoryGB { get { throw null; } } + public string Name { get { throw null; } } + public int? OSVhdSizeMB { get { throw null; } } + public bool? PremiumIO { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SupportedComputeTypes { get { throw null; } } + public int? VCPUs { get { throw null; } } } - public abstract partial class Seasonality + public partial class MachineLearningVmSshCredentials { - protected Seasonality() { } + public MachineLearningVmSshCredentials() { } + public string Password { get { throw null; } set { } } + public string PrivateKeyData { get { throw null; } set { } } + public string PublicKeyData { get { throw null; } set { } } + public string Username { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ServiceDataAccessAuthIdentity : System.IEquatable + public readonly partial struct MachineLearningVmTier : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ServiceDataAccessAuthIdentity(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity WorkspaceSystemAssignedIdentity { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity WorkspaceUserAssignedIdentity { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity other) { throw null; } + public MachineLearningVmTier(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier LowPriority { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier Spot { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier Standard { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier 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.ServiceDataAccessAuthIdentity left, Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity left, Azure.ResourceManager.MachineLearning.Models.ServiceDataAccessAuthIdentity right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier left, Azure.ResourceManager.MachineLearning.Models.MachineLearningVmTier right) { throw null; } public override string ToString() { throw null; } } - public partial class ServicePrincipalDatastoreCredentials : Azure.ResourceManager.MachineLearning.Models.DatastoreCredentials - { - public ServicePrincipalDatastoreCredentials(System.Guid clientId, Azure.ResourceManager.MachineLearning.Models.ServicePrincipalDatastoreSecrets secrets, System.Guid tenantId) { } - public System.Uri AuthorityUri { get { throw null; } set { } } - public System.Guid ClientId { get { throw null; } set { } } - public System.Uri ResourceUri { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ServicePrincipalDatastoreSecrets Secrets { get { throw null; } set { } } - public System.Guid TenantId { get { throw null; } set { } } - } - public partial class ServicePrincipalDatastoreSecrets : Azure.ResourceManager.MachineLearning.Models.DatastoreSecrets - { - public ServicePrincipalDatastoreSecrets() { } - public string ClientSecret { get { throw null; } set { } } - } - public partial class SharedPrivateLinkResource - { - public SharedPrivateLinkResource() { } - public string GroupId { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string PrivateLinkResourceId { get { throw null; } set { } } - public string RequestMessage { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningPrivateEndpointServiceConnectionStatus? Status { get { throw null; } set { } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ShortSeriesHandlingConfiguration : System.IEquatable + public readonly partial struct MachineLearningWeekday : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ShortSeriesHandlingConfiguration(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration Auto { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration Drop { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration Pad { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration other) { throw null; } + public MachineLearningWeekday(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Friday { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Monday { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Saturday { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Sunday { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Thursday { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Tuesday { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday Wednesday { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday 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.ShortSeriesHandlingConfiguration left, Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration left, Azure.ResourceManager.MachineLearning.Models.ShortSeriesHandlingConfiguration right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday left, Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday left, Azure.ResourceManager.MachineLearning.Models.MachineLearningWeekday right) { throw null; } public override string ToString() { throw null; } } - public partial class SkuCapacity + public partial class MachineLearningWorkspaceConnectionManagedIdentity { - internal SkuCapacity() { } - public int? Default { get { throw null; } } - public int? Maximum { get { throw null; } } - public int? Minimum { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.SkuScaleType? ScaleType { get { throw null; } } + public MachineLearningWorkspaceConnectionManagedIdentity() { } + public string ClientId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } } - public partial class SkuResource + public abstract partial class MachineLearningWorkspaceConnectionProperties { - internal SkuResource() { } - public Azure.ResourceManager.MachineLearning.Models.SkuCapacity Capacity { get { throw null; } } - public string ResourceType { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.SkuSetting Sku { get { throw null; } } + protected MachineLearningWorkspaceConnectionProperties() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningConnectionCategory? Category { get { throw null; } set { } } + public string Target { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningValueFormat? ValueFormat { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SkuScaleType : System.IEquatable + public partial class MachineLearningWorkspaceConnectionUsernamePassword { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SkuScaleType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SkuScaleType Automatic { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SkuScaleType Manual { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SkuScaleType None { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.SkuScaleType 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.SkuScaleType left, Azure.ResourceManager.MachineLearning.Models.SkuScaleType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.SkuScaleType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SkuScaleType left, Azure.ResourceManager.MachineLearning.Models.SkuScaleType right) { throw null; } - public override string ToString() { throw null; } + public MachineLearningWorkspaceConnectionUsernamePassword() { } + public string Password { get { throw null; } set { } } + public string Username { get { throw null; } set { } } } - public partial class SkuSetting + public partial class MachineLearningWorkspaceDiagnoseContent { - internal SkuSetting() { } - public string Name { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MachineLearningSkuTier? Tier { get { throw null; } } + public MachineLearningWorkspaceDiagnoseContent() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceDiagnoseProperties Value { get { throw null; } set { } } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SourceType : System.IEquatable + public partial class MachineLearningWorkspaceDiagnoseProperties { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public SourceType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SourceType Dataset { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SourceType Datastore { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SourceType Uri { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.SourceType 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.SourceType left, Azure.ResourceManager.MachineLearning.Models.SourceType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.SourceType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SourceType left, Azure.ResourceManager.MachineLearning.Models.SourceType right) { throw null; } - public override string ToString() { throw null; } + public MachineLearningWorkspaceDiagnoseProperties() { } + public System.Collections.Generic.IDictionary ApplicationInsights { get { throw null; } } + public System.Collections.Generic.IDictionary ContainerRegistry { get { throw null; } } + public System.Collections.Generic.IDictionary DnsResolution { get { throw null; } } + 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 ResourceLock { get { throw null; } } + public System.Collections.Generic.IDictionary StorageAccount { get { throw null; } } + public System.Collections.Generic.IDictionary Udr { get { throw null; } } + } + public partial class MachineLearningWorkspaceDiagnoseResult + { + internal MachineLearningWorkspaceDiagnoseResult() { } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDiagnoseResultValue Value { get { throw null; } } + } + public partial class MachineLearningWorkspaceGetKeysResult + { + internal MachineLearningWorkspaceGetKeysResult() { } + public string AppInsightsInstrumentationKey { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningContainerRegistryCredentials ContainerRegistryCredentials { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceGetNotebookKeysResult NotebookAccessKeys { get { throw null; } } + public string UserStorageKey { get { throw null; } } + public string UserStorageResourceId { get { throw null; } } + } + public partial class MachineLearningWorkspaceGetNotebookKeysResult + { + internal MachineLearningWorkspaceGetNotebookKeysResult() { } + public string PrimaryAccessKey { get { throw null; } } + public string SecondaryAccessKey { get { throw null; } } + } + public partial class MachineLearningWorkspaceGetStorageAccountKeysResult + { + internal MachineLearningWorkspaceGetStorageAccountKeysResult() { } + public string UserStorageKey { get { throw null; } } + } + public partial class MachineLearningWorkspaceNotebookAccessTokenResult + { + internal MachineLearningWorkspaceNotebookAccessTokenResult() { } + public string AccessToken { get { throw null; } } + public int? ExpiresIn { get { throw null; } } + public string HostName { get { throw null; } } + public string NotebookResourceId { get { throw null; } } + public string PublicDns { get { throw null; } } + public string RefreshToken { get { throw null; } } + public string Scope { get { throw null; } } + public string TokenType { get { throw null; } } + } + public partial class MachineLearningWorkspacePatch + { + public MachineLearningWorkspacePatch() { } + 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 string FriendlyName { get { throw null; } set { } } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public string ImageBuildCompute { get { throw null; } set { } } + public string PrimaryUserAssignedIdentity { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningPublicNetworkAccess? PublicNetworkAccess { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningSku Sku { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SshPublicAccess : System.IEquatable + public readonly partial struct MachineLearningWorkspaceQuotaStatus : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SshPublicAccess(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SshPublicAccess Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SshPublicAccess Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.SshPublicAccess other) { throw null; } + public MachineLearningWorkspaceQuotaStatus(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus Failure { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus InvalidQuotaBelowClusterMinimum { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus InvalidQuotaExceedsSubscriptionLimit { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus InvalidVmFamilyName { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus OperationNotEnabledForRegion { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus OperationNotSupportedForSku { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus Success { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus Undefined { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus 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.SshPublicAccess left, Azure.ResourceManager.MachineLearning.Models.SshPublicAccess right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.SshPublicAccess (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SshPublicAccess left, Azure.ResourceManager.MachineLearning.Models.SshPublicAccess right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus left, Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class MachineLearningWorkspaceQuotaUpdate + { + internal MachineLearningWorkspaceQuotaUpdate() { } + public string Id { get { throw null; } } + public long? Limit { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningWorkspaceQuotaStatus? Status { get { throw null; } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningQuotaUnit? Unit { get { throw null; } } + public string UpdateWorkspaceQuotasType { get { throw null; } } + } + public partial class MedianStoppingPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy + { + public MedianStoppingPolicy() { } + } + public partial class MpiDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration + { + public MpiDistributionConfiguration() { } + public int? ProcessCountPerInstance { get { throw null; } set { } } + } + public abstract partial class NCrossValidations + { + protected NCrossValidations() { } + } + public partial class NlpVerticalLimitSettings + { + public NlpVerticalLimitSettings() { } + public int? MaxConcurrentTrials { get { throw null; } set { } } + public int? MaxTrials { get { throw null; } set { } } + public System.TimeSpan? Timeout { get { throw null; } set { } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct SslConfigStatus : System.IEquatable + public readonly partial struct ObjectDetectionPrimaryMetric : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public SslConfigStatus(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.SslConfigStatus Auto { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SslConfigStatus Disabled { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.SslConfigStatus Enabled { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.SslConfigStatus other) { throw null; } + public ObjectDetectionPrimaryMetric(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric MeanAveragePrecision { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric 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.SslConfigStatus left, Azure.ResourceManager.MachineLearning.Models.SslConfigStatus right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.SslConfigStatus (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SslConfigStatus left, Azure.ResourceManager.MachineLearning.Models.SslConfigStatus right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric left, Azure.ResourceManager.MachineLearning.Models.ObjectDetectionPrimaryMetric right) { throw null; } public override string ToString() { throw null; } } - public partial class SslConfiguration + public partial class PyTorchDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration { - public SslConfiguration() { } - public string Cert { get { throw null; } set { } } - public string Cname { get { throw null; } set { } } - public string Key { get { throw null; } set { } } - public string LeafDomainLabel { get { throw null; } set { } } - public bool? OverwriteExistingDomain { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.SslConfigStatus? Status { get { throw null; } set { } } + public PyTorchDistributionConfiguration() { } + public int? ProcessCountPerInstance { get { throw null; } set { } } } - public partial class StackEnsembleSettings + public partial class RandomSamplingAlgorithm : Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm { - public StackEnsembleSettings() { } - public System.BinaryData StackMetaLearnerKWargs { get { throw null; } set { } } - public double? StackMetaLearnerTrainPercentage { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType? StackMetaLearnerType { get { throw null; } set { } } + public RandomSamplingAlgorithm() { } + public Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule? Rule { get { throw null; } set { } } + public int? Seed { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StackMetaLearnerType : System.IEquatable + public readonly partial struct RandomSamplingAlgorithmRule : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public StackMetaLearnerType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType ElasticNet { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType ElasticNetCV { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType LightGBMClassifier { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType LightGBMRegressor { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType LinearRegression { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType LogisticRegression { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType LogisticRegressionCV { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType None { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType other) { throw null; } + public RandomSamplingAlgorithmRule(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule Random { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule Sobol { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule 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.StackMetaLearnerType left, Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType left, Azure.ResourceManager.MachineLearning.Models.StackMetaLearnerType right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule left, Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.RandomSamplingAlgorithmRule (string value) { throw null; } + 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 RegressionTrainingSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningTrainingSettings + { + public RegressionTrainingSettings() { } + public System.Collections.Generic.IList AllowedTrainingAlgorithms { get { throw null; } set { } } + public System.Collections.Generic.IList BlockedTrainingAlgorithms { get { throw null; } set { } } + } + public abstract partial class SamplingAlgorithm + { + protected SamplingAlgorithm() { } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Status : System.IEquatable + public readonly partial struct SamplingAlgorithmType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public Status(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.Status Failure { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status InvalidQuotaBelowClusterMinimum { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status InvalidQuotaExceedsSubscriptionLimit { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status InvalidVmFamilyName { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status OperationNotEnabledForRegion { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status OperationNotSupportedForSku { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status Success { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.Status Undefined { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.Status other) { throw null; } + public SamplingAlgorithmType(string value) { throw null; } + public static Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType Bayesian { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType Grid { get { throw null; } } + public static Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType Random { get { throw null; } } + public bool Equals(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType 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.Status left, Azure.ResourceManager.MachineLearning.Models.Status right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.Status (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.Status left, Azure.ResourceManager.MachineLearning.Models.Status right) { throw null; } + public static bool operator ==(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType left, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType right) { throw null; } + public static implicit operator Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType left, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithmType right) { throw null; } public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] @@ -4195,76 +4586,13 @@ public StackEnsembleSettings() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer left, Azure.ResourceManager.MachineLearning.Models.StochasticOptimizer right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct StorageAccountType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public StorageAccountType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.StorageAccountType PremiumLRS { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.StorageAccountType StandardLRS { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.StorageAccountType 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.StorageAccountType left, Azure.ResourceManager.MachineLearning.Models.StorageAccountType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.StorageAccountType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.StorageAccountType left, Azure.ResourceManager.MachineLearning.Models.StorageAccountType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class SweepJob : Azure.ResourceManager.MachineLearning.Models.MachineLearningJobProperties - { - public SweepJob(Azure.ResourceManager.MachineLearning.Models.Objective objective, Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm samplingAlgorithm, System.BinaryData searchSpace, Azure.ResourceManager.MachineLearning.Models.TrialComponent trial) { } - public Azure.ResourceManager.MachineLearning.Models.EarlyTerminationPolicy EarlyTermination { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Inputs { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.SweepJobLimits Limits { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.Objective Objective { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Outputs { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.SamplingAlgorithm SamplingAlgorithm { get { throw null; } set { } } - public System.BinaryData SearchSpace { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.TrialComponent Trial { get { throw null; } set { } } - } - public partial class SweepJobLimits : Azure.ResourceManager.MachineLearning.Models.JobLimits - { - public SweepJobLimits() { } - public int? MaxConcurrentTrials { get { throw null; } set { } } - public int? MaxTotalTrials { get { throw null; } set { } } - public System.TimeSpan? TrialTimeout { get { throw null; } set { } } - } - public partial class SynapseSparkCompute : Azure.ResourceManager.MachineLearning.Models.Compute - { - public SynapseSparkCompute() { } - public Azure.ResourceManager.MachineLearning.Models.SynapseSparkProperties Properties { get { throw null; } set { } } - } - public partial class SynapseSparkProperties - { - public SynapseSparkProperties() { } - public Azure.ResourceManager.MachineLearning.Models.AutoPauseProperties AutoPauseProperties { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.AutoScaleProperties AutoScaleProperties { get { throw null; } set { } } - public int? NodeCount { get { throw null; } set { } } - public string NodeSize { get { throw null; } set { } } - public string NodeSizeFamily { get { throw null; } set { } } - public string PoolName { get { throw null; } set { } } - public string ResourceGroup { get { throw null; } set { } } - public string SparkVersion { get { throw null; } set { } } - public string SubscriptionId { get { throw null; } set { } } - public string WorkspaceName { get { throw null; } set { } } - } - public partial class SystemService - { - internal SystemService() { } - public string PublicIPAddress { get { throw null; } } - public string SystemServiceType { get { throw null; } } - public string Version { get { throw null; } } - } - public partial class TableVerticalFeaturizationSettings : Azure.ResourceManager.MachineLearning.Models.FeaturizationSettings + public partial class TableVerticalFeaturizationSettings : Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationSettings { public TableVerticalFeaturizationSettings() { } public System.Collections.Generic.IList BlockedTransformers { get { throw null; } set { } } public System.Collections.Generic.IDictionary ColumnNameAndTypes { get { throw null; } set { } } public bool? EnableDnnFeaturization { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.FeaturizationMode? Mode { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningFeaturizationMode? Mode { get { throw null; } set { } } public System.Collections.Generic.IDictionary> TransformerParams { get { throw null; } set { } } } public partial class TableVerticalLimitSettings @@ -4307,242 +4635,52 @@ public abstract partial class TargetRollingWindowSize { protected TargetRollingWindowSize() { } } - public partial class TargetUtilizationScaleSettings : Azure.ResourceManager.MachineLearning.Models.OnlineScaleSettings - { - public TargetUtilizationScaleSettings() { } - public int? MaxInstances { get { throw null; } set { } } - public int? MinInstances { get { throw null; } set { } } - public System.TimeSpan? PollingInterval { get { throw null; } set { } } - public int? TargetUtilizationPercentage { get { throw null; } set { } } - } - public partial class TensorFlow : Azure.ResourceManager.MachineLearning.Models.DistributionConfiguration + public partial class TensorFlowDistributionConfiguration : Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration { - public TensorFlow() { } + public TensorFlowDistributionConfiguration() { } public int? ParameterServerCount { get { throw null; } set { } } public int? WorkerCount { get { throw null; } set { } } } public partial class TextClassification : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { - public TextClassification(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } + public TextClassification(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public string FeaturizationDatasetLanguage { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } } public partial class TextClassificationMultilabel : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { - public TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } + public TextClassificationMultilabel(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public string FeaturizationDatasetLanguage { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationMultilabelPrimaryMetric? PrimaryMetric { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } } public partial class TextNer : Azure.ResourceManager.MachineLearning.Models.AutoMLVertical { - public TextNer(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MLTableJobInput)) { } + public TextNer(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput trainingData) : base (default(Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput)) { } public string FeaturizationDatasetLanguage { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.NlpVerticalLimitSettings LimitSettings { get { throw null; } set { } } public Azure.ResourceManager.MachineLearning.Models.ClassificationPrimaryMetric? PrimaryMetric { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.MLTableJobInput ValidationData { get { throw null; } set { } } - } - public partial class TrainingSettings - { - public TrainingSettings() { } - public bool? EnableDnnTraining { get { throw null; } set { } } - public bool? EnableModelExplainability { get { throw null; } set { } } - public bool? EnableOnnxCompatibleModels { get { throw null; } set { } } - public bool? EnableStackEnsemble { get { throw null; } set { } } - public bool? EnableVoteEnsemble { get { throw null; } set { } } - public System.TimeSpan? EnsembleModelDownloadTimeout { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.StackEnsembleSettings StackEnsembleSettings { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningTableJobInput ValidationData { get { throw null; } set { } } } public partial class TrialComponent { public TrialComponent(string command, string environmentId) { } public string CodeId { get { throw null; } set { } } public string Command { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.DistributionConfiguration Distribution { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningDistributionConfiguration Distribution { get { throw null; } set { } } public string EnvironmentId { get { throw null; } set { } } public System.Collections.Generic.IDictionary EnvironmentVariables { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.JobResourceConfiguration Resources { get { throw null; } set { } } - } - public abstract partial class TriggerBase - { - protected TriggerBase() { } - public string EndTime { get { throw null; } set { } } - public string StartTime { get { throw null; } set { } } - public string TimeZone { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct TriggerType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public TriggerType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.TriggerType Cron { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.TriggerType Recurrence { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.TriggerType 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.TriggerType left, Azure.ResourceManager.MachineLearning.Models.TriggerType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.TriggerType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.TriggerType left, Azure.ResourceManager.MachineLearning.Models.TriggerType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class TritonModelJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput - { - public TritonModelJobInput(System.Uri uri) { } - public Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class TritonModelJobOutput : Azure.ResourceManager.MachineLearning.Models.JobOutput - { - public TritonModelJobOutput() { } - public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } + public Azure.ResourceManager.MachineLearning.Models.MachineLearningJobResourceConfiguration Resources { get { throw null; } set { } } } - public partial class TruncationSelectionPolicy : Azure.ResourceManager.MachineLearning.Models.EarlyTerminationPolicy + public partial class TruncationSelectionPolicy : Azure.ResourceManager.MachineLearning.Models.MachineLearningEarlyTerminationPolicy { public TruncationSelectionPolicy() { } public int? TruncationPercentage { get { throw null; } set { } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UnderlyingResourceAction : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UnderlyingResourceAction(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction Delete { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction Detach { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction 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.UnderlyingResourceAction left, Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction left, Azure.ResourceManager.MachineLearning.Models.UnderlyingResourceAction right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UnitOfMeasure : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UnitOfMeasure(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure OneHour { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure 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.UnitOfMeasure left, Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure left, Azure.ResourceManager.MachineLearning.Models.UnitOfMeasure right) { throw null; } - public override string ToString() { throw null; } - } - public partial class UpdateWorkspaceQuotas - { - internal UpdateWorkspaceQuotas() { } - public string Id { get { throw null; } } - public long? Limit { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.Status? Status { get { throw null; } } - public Azure.ResourceManager.MachineLearning.Models.QuotaUnit? Unit { get { throw null; } } - public string UpdateWorkspaceQuotasType { get { throw null; } } - } - public partial class UriFileDataVersion : Azure.ResourceManager.MachineLearning.Models.DataVersionProperties - { - public UriFileDataVersion(System.Uri dataUri) : base (default(System.Uri)) { } - } - public partial class UriFileJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput - { - public UriFileJobInput(System.Uri uri) { } - public Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class UriFileJobOutput : Azure.ResourceManager.MachineLearning.Models.JobOutput - { - public UriFileJobOutput() { } - public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class UriFolderDataVersion : Azure.ResourceManager.MachineLearning.Models.DataVersionProperties - { - public UriFolderDataVersion(System.Uri dataUri) : base (default(System.Uri)) { } - } - public partial class UriFolderJobInput : Azure.ResourceManager.MachineLearning.Models.JobInput - { - public UriFolderJobInput(System.Uri uri) { } - public Azure.ResourceManager.MachineLearning.Models.InputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class UriFolderJobOutput : Azure.ResourceManager.MachineLearning.Models.JobOutput - { - public UriFolderJobOutput() { } - public Azure.ResourceManager.MachineLearning.Models.OutputDeliveryMode? Mode { get { throw null; } set { } } - public System.Uri Uri { get { throw null; } set { } } - } - public partial class UsageName - { - internal UsageName() { } - public string LocalizedValue { get { throw null; } } - public string Value { get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UsageUnit : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UsageUnit(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.UsageUnit Count { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.UsageUnit 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.UsageUnit left, Azure.ResourceManager.MachineLearning.Models.UsageUnit right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.UsageUnit (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.UsageUnit left, Azure.ResourceManager.MachineLearning.Models.UsageUnit right) { throw null; } - public override string ToString() { throw null; } - } - public partial class UserAccountCredentials - { - public UserAccountCredentials(string adminUserName) { } - public string AdminUserName { get { throw null; } set { } } - public string AdminUserPassword { get { throw null; } set { } } - public string AdminUserSshPublicKey { get { throw null; } set { } } - } - public partial class UserIdentity : Azure.ResourceManager.MachineLearning.Models.IdentityConfiguration - { - public UserIdentity() { } - } - public partial class UsernamePasswordAuthTypeWorkspaceConnectionProperties : Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionPropertiesV2 - { - public UsernamePasswordAuthTypeWorkspaceConnectionProperties() { } - public Azure.ResourceManager.MachineLearning.Models.WorkspaceConnectionUsernamePassword Credentials { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct UseStl : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public UseStl(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.UseStl None { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.UseStl Season { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.UseStl SeasonTrend { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.UseStl 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.UseStl left, Azure.ResourceManager.MachineLearning.Models.UseStl right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.UseStl (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.UseStl left, Azure.ResourceManager.MachineLearning.Models.UseStl right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ValidationMetricType : System.IEquatable { private readonly object _dummy; @@ -4562,162 +4700,4 @@ public UsernamePasswordAuthTypeWorkspaceConnectionProperties() { } public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ValidationMetricType left, Azure.ResourceManager.MachineLearning.Models.ValidationMetricType right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ValueFormat : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ValueFormat(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.ValueFormat Json { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.ValueFormat 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.ValueFormat left, Azure.ResourceManager.MachineLearning.Models.ValueFormat right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.ValueFormat (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.ValueFormat left, Azure.ResourceManager.MachineLearning.Models.ValueFormat right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VirtualMachineCompute : Azure.ResourceManager.MachineLearning.Models.Compute - { - public VirtualMachineCompute() { } - public Azure.ResourceManager.MachineLearning.Models.VirtualMachineSchemaProperties Properties { get { throw null; } set { } } - } - public partial class VirtualMachineSchemaProperties - { - public VirtualMachineSchemaProperties() { } - public string Address { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.VirtualMachineSshCredentials AdministratorAccount { get { throw null; } set { } } - public bool? IsNotebookInstanceCompute { get { throw null; } set { } } - public int? NotebookServerPort { get { throw null; } set { } } - public int? SshPort { get { throw null; } set { } } - public string VirtualMachineSize { get { throw null; } set { } } - } - public partial class VirtualMachineSecrets : Azure.ResourceManager.MachineLearning.Models.ComputeSecrets - { - internal VirtualMachineSecrets() { } - public Azure.ResourceManager.MachineLearning.Models.VirtualMachineSshCredentials AdministratorAccount { get { throw null; } } - } - public partial class VirtualMachineSize - { - internal VirtualMachineSize() { } - public Azure.ResourceManager.MachineLearning.Models.EstimatedVmPrices EstimatedVmPrices { get { throw null; } } - public string Family { get { throw null; } } - public int? Gpus { get { throw null; } } - public bool? LowPriorityCapable { get { throw null; } } - public int? MaxResourceVolumeMB { get { throw null; } } - public double? MemoryGB { get { throw null; } } - public string Name { get { throw null; } } - public int? OSVhdSizeMB { get { throw null; } } - public bool? PremiumIO { get { throw null; } } - public System.Collections.Generic.IReadOnlyList SupportedComputeTypes { get { throw null; } } - public int? VCPUs { get { throw null; } } - } - public partial class VirtualMachineSshCredentials - { - public VirtualMachineSshCredentials() { } - public string Password { get { throw null; } set { } } - public string PrivateKeyData { get { throw null; } set { } } - public string PublicKeyData { get { throw null; } set { } } - public string Username { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VmPriceOSType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VmPriceOSType(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.VmPriceOSType Linux { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.VmPriceOSType Windows { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.VmPriceOSType 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.VmPriceOSType left, Azure.ResourceManager.MachineLearning.Models.VmPriceOSType right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.VmPriceOSType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.VmPriceOSType left, Azure.ResourceManager.MachineLearning.Models.VmPriceOSType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VmPriority : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VmPriority(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.VmPriority Dedicated { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.VmPriority LowPriority { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.VmPriority 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.VmPriority left, Azure.ResourceManager.MachineLearning.Models.VmPriority right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.VmPriority (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.VmPriority left, Azure.ResourceManager.MachineLearning.Models.VmPriority right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VmTier : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VmTier(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.VmTier LowPriority { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.VmTier Spot { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.VmTier Standard { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.VmTier 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.VmTier left, Azure.ResourceManager.MachineLearning.Models.VmTier right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.VmTier (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.VmTier left, Azure.ResourceManager.MachineLearning.Models.VmTier right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct WeekDay : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public WeekDay(string value) { throw null; } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Friday { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Monday { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Saturday { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Sunday { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Thursday { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Tuesday { get { throw null; } } - public static Azure.ResourceManager.MachineLearning.Models.WeekDay Wednesday { get { throw null; } } - public bool Equals(Azure.ResourceManager.MachineLearning.Models.WeekDay 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.WeekDay left, Azure.ResourceManager.MachineLearning.Models.WeekDay right) { throw null; } - public static implicit operator Azure.ResourceManager.MachineLearning.Models.WeekDay (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.MachineLearning.Models.WeekDay left, Azure.ResourceManager.MachineLearning.Models.WeekDay right) { throw null; } - public override string ToString() { throw null; } - } - public partial class WorkspaceConnectionManagedIdentity - { - public WorkspaceConnectionManagedIdentity() { } - public string ClientId { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } - } - public abstract partial class WorkspaceConnectionPropertiesV2 - { - protected WorkspaceConnectionPropertiesV2() { } - public Azure.ResourceManager.MachineLearning.Models.ConnectionCategory? Category { get { throw null; } set { } } - public string Target { get { throw null; } set { } } - public string Value { get { throw null; } set { } } - public Azure.ResourceManager.MachineLearning.Models.ValueFormat? ValueFormat { get { throw null; } set { } } - } - public partial class WorkspaceConnectionUsernamePassword - { - public WorkspaceConnectionUsernamePassword() { } - public string Password { get { throw null; } set { } } - public string Username { get { throw null; } set { } } - } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.Serialization.cs new file mode 100644 index 000000000000..2ec48f96946a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningPartialManagedServiceIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ManagedServiceIdentityType)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(ManagedServiceIdentityType.Value.ToString()); + } + if (Optional.IsCollectionDefined(UserAssignedIdentities)) + { + writer.WritePropertyName("userAssignedIdentities"); + writer.WriteStartObject(); + foreach (var item in UserAssignedIdentities) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.cs new file mode 100644 index 000000000000..6ef57e77192a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Customized/MachineLearningPartialManagedServiceIdentity.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +[assembly:CodeGenSuppressType("MachineLearningPartialManagedServiceIdentity")] +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// + public partial class MachineLearningPartialManagedServiceIdentity + { + /// Initializes a new instance of PartialManagedServiceIdentity. + public MachineLearningPartialManagedServiceIdentity() + { + UserAssignedIdentities = new ChangeTrackingDictionary(); + } + + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: PartialManagedServiceIdentity.type + /// + public Azure.ResourceManager.Models.ManagedServiceIdentityType? ManagedServiceIdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + /// Serialized Name: PartialManagedServiceIdentity.userAssignedIdentities + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 UserAssignedIdentities { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentCollection.cs deleted file mode 100644 index 0b28d0fee119..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentCollection.cs +++ /dev/null @@ -1,339 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetBatchDeployments method from an instance of . - /// - public partial class BatchDeploymentCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _batchDeploymentClientDiagnostics; - private readonly BatchDeploymentsRestOperations _batchDeploymentRestClient; - - /// Initializes a new instance of the class for mocking. - protected BatchDeploymentCollection() - { - } - - /// 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 BatchDeploymentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _batchDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", BatchDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BatchDeploymentResource.ResourceType, out string batchDeploymentApiVersion); - _batchDeploymentRestClient = new BatchDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, batchDeploymentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != BatchEndpointResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BatchEndpointResource.ResourceType), nameof(id)); - } - - /// - /// Creates/updates a batch inference deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_CreateOrUpdate - /// - /// 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 identifier for the Batch inference deployment. - /// Batch inference deployment definition 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, BatchDeploymentData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new BatchDeploymentOperationSource(Client), _batchDeploymentClientDiagnostics, Pipeline, _batchDeploymentRestClient.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; - } - } - - /// - /// Creates/updates a batch inference deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_CreateOrUpdate - /// - /// 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 identifier for the Batch inference deployment. - /// Batch inference deployment definition 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, BatchDeploymentData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new BatchDeploymentOperationSource(Client), _batchDeploymentClientDiagnostics, Pipeline, _batchDeploymentRestClient.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; - } - } - - /// - /// Gets a batch inference deployment by id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The identifier for the Batch deployments. - /// 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 = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.Get"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.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 BatchDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a batch inference deployment by id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The identifier for the Batch deployments. - /// 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 = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.Get"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.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 BatchDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists Batch inference deployments in the workspace. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments - /// Operation Id: BatchDeployments_List - /// - /// Ordering of list. - /// Top of list. - /// 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 GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Lists Batch inference deployments in the workspace. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments - /// Operation Id: BatchDeployments_List - /// - /// Ordering of list. - /// Top of list. - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The identifier for the Batch deployments. - /// 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 = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.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}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The identifier for the Batch deployments. - /// 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 = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.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; - } - } - - 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/BatchDeploymentData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentData.cs deleted file mode 100644 index 4fa8c8924fb0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentData.cs +++ /dev/null @@ -1,58 +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 BatchDeployment data model. - public partial class BatchDeploymentData : TrackedResourceData - { - /// Initializes a new instance of BatchDeploymentData. - /// The location. - /// [Required] Additional attributes of the entity. - /// is null. - public BatchDeploymentData(AzureLocation location, BatchDeploymentProperties properties) : base(location) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of BatchDeploymentData. - /// 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. - internal BatchDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, BatchDeploymentProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - Kind = kind; - Properties = properties; - Sku = sku; - } - - /// 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 BatchDeploymentProperties Properties { 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/BatchDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentResource.cs deleted file mode 100644 index 628790e1ea47..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchDeploymentResource.cs +++ /dev/null @@ -1,513 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a BatchDeployment 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 GetBatchDeploymentResource method. - /// Otherwise you can get one from its parent resource using the GetBatchDeployment method. - /// - public partial class BatchDeploymentResource : ArmResource - { - /// Generate the resource identifier of a instance. - 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}/batchEndpoints/{endpointName}/deployments/{deploymentName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _batchDeploymentClientDiagnostics; - private readonly BatchDeploymentsRestOperations _batchDeploymentRestClient; - private readonly BatchDeploymentData _data; - - /// Initializes a new instance of the class for mocking. - protected BatchDeploymentResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal BatchDeploymentResource(ArmClient client, BatchDeploymentData 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 BatchDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _batchDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string batchDeploymentApiVersion); - _batchDeploymentRestClient = new BatchDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, batchDeploymentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/batchEndpoints/deployments"; - - /// 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 BatchDeploymentData 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 batch inference deployment by id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.Get"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.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 BatchDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a batch inference deployment by id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.Get"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.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 BatchDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Batch Inference deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Delete - /// - /// 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 = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.Delete"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_batchDeploymentClientDiagnostics, Pipeline, _batchDeploymentRestClient.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 Batch Inference deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Delete - /// - /// 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 = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.Delete"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_batchDeploymentClientDiagnostics, Pipeline, _batchDeploymentRestClient.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 a batch inference deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Update - /// - /// 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. - /// Batch inference deployment definition object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, BatchDeploymentPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.Update"); - scope.Start(); - try - { - var response = await _batchDeploymentRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new BatchDeploymentOperationSource(Client), _batchDeploymentClientDiagnostics, Pipeline, _batchDeploymentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a batch inference deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Update - /// - /// 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. - /// Batch inference deployment definition object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, BatchDeploymentPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.Update"); - scope.Start(); - try - { - var response = _batchDeploymentRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new MachineLearningArmOperation(new BatchDeploymentOperationSource(Client), _batchDeploymentClientDiagnostics, Pipeline, _batchDeploymentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _batchDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new BatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new BatchDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _batchDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new BatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new BatchDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _batchDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new BatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new BatchDeploymentPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _batchDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new BatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new BatchDeploymentPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _batchDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new BatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new BatchDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _batchDeploymentClientDiagnostics.CreateScope("BatchDeploymentResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _batchDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new BatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new BatchDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointCollection.cs deleted file mode 100644 index a0528cc31ef9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointCollection.cs +++ /dev/null @@ -1,337 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetBatchEndpoints method from an instance of . - /// - public partial class BatchEndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _batchEndpointClientDiagnostics; - private readonly BatchEndpointsRestOperations _batchEndpointRestClient; - - /// Initializes a new instance of the class for mocking. - protected BatchEndpointCollection() - { - } - - /// 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 BatchEndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _batchEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", BatchEndpointResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(BatchEndpointResource.ResourceType, out string batchEndpointApiVersion); - _batchEndpointRestClient = new BatchEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, batchEndpointApiVersion); -#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)); - } - - /// - /// Creates a batch inference endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_CreateOrUpdate - /// - /// 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 for the Batch inference endpoint. - /// Batch inference endpoint definition 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, BatchEndpointData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new BatchEndpointOperationSource(Client), _batchEndpointClientDiagnostics, Pipeline, _batchEndpointRestClient.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; - } - } - - /// - /// Creates a batch inference endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_CreateOrUpdate - /// - /// 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 for the Batch inference endpoint. - /// Batch inference endpoint definition 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, BatchEndpointData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new BatchEndpointOperationSource(Client), _batchEndpointClientDiagnostics, Pipeline, _batchEndpointRestClient.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 a batch inference endpoint by name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// Name for the Batch Endpoint. - /// 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 = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.Get"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BatchEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a batch inference endpoint by name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// Name for the Batch Endpoint. - /// 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 = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.Get"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BatchEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists Batch inference endpoint in the workspace. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints - /// Operation Id: BatchEndpoints_List - /// - /// Number of endpoints to be retrieved in a page of results. - /// 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 GetAllAsync(int? count = null, string skip = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new BatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Lists Batch inference endpoint in the workspace. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints - /// Operation Id: BatchEndpoints_List - /// - /// Number of endpoints to be retrieved in a page of results. - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(int? count = null, string skip = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new BatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// Name for the Batch Endpoint. - /// 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 = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.Exists"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.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}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// Name for the Batch Endpoint. - /// 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 = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointCollection.Exists"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.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; - } - } - - 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/BatchEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointData.cs deleted file mode 100644 index 0a2c1fba01c8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointData.cs +++ /dev/null @@ -1,58 +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 BatchEndpoint data model. - public partial class BatchEndpointData : TrackedResourceData - { - /// Initializes a new instance of BatchEndpointData. - /// The location. - /// [Required] Additional attributes of the entity. - /// is null. - public BatchEndpointData(AzureLocation location, BatchEndpointProperties properties) : base(location) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of BatchEndpointData. - /// 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. - internal BatchEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, BatchEndpointProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - Kind = kind; - Properties = properties; - Sku = sku; - } - - /// 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 BatchEndpointProperties Properties { 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/BatchEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointResource.cs deleted file mode 100644 index 3d71aaf3e474..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/BatchEndpointResource.cs +++ /dev/null @@ -1,594 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a BatchEndpoint 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 GetBatchEndpointResource method. - /// Otherwise you can get one from its parent resource using the GetBatchEndpoint method. - /// - public partial class BatchEndpointResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _batchEndpointClientDiagnostics; - private readonly BatchEndpointsRestOperations _batchEndpointRestClient; - private readonly BatchEndpointData _data; - - /// Initializes a new instance of the class for mocking. - protected BatchEndpointResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal BatchEndpointResource(ArmClient client, BatchEndpointData 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 BatchEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _batchEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string batchEndpointApiVersion); - _batchEndpointRestClient = new BatchEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, batchEndpointApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/batchEndpoints"; - - /// 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 BatchEndpointData 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 BatchDeploymentResources in the BatchEndpoint. - /// An object representing collection of BatchDeploymentResources and their operations over a BatchDeploymentResource. - public virtual BatchDeploymentCollection GetBatchDeployments() - { - return GetCachedClient(Client => new BatchDeploymentCollection(Client, Id)); - } - - /// - /// Gets a batch inference deployment by id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The identifier for the Batch deployments. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetBatchDeploymentAsync(string deploymentName, CancellationToken cancellationToken = default) - { - return await GetBatchDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a batch inference deployment by id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: BatchDeployments_Get - /// - /// The identifier for the Batch deployments. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetBatchDeployment(string deploymentName, CancellationToken cancellationToken = default) - { - return GetBatchDeployments().Get(deploymentName, cancellationToken); - } - - /// - /// Gets a batch inference endpoint by name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.Get"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.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 BatchEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Gets a batch inference endpoint by name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.Get"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new BatchEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Batch Inference Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Delete - /// - /// 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 = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.Delete"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_batchEndpointClientDiagnostics, Pipeline, _batchEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Batch Inference Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Delete - /// - /// 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 = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.Delete"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_batchEndpointClientDiagnostics, Pipeline, _batchEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a batch inference endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Update - /// - /// 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. - /// Mutable batch inference endpoint definition object. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.Update"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new BatchEndpointOperationSource(Client), _batchEndpointClientDiagnostics, Pipeline, _batchEndpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update a batch inference endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Update - /// - /// 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. - /// Mutable batch inference endpoint definition object. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.Update"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new MachineLearningArmOperation(new BatchEndpointOperationSource(Client), _batchEndpointClientDiagnostics, Pipeline, _batchEndpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists batch Inference Endpoint keys. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys - /// Operation Id: BatchEndpoints_ListKeys - /// - /// The cancellation token to use. - public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.GetKeys"); - scope.Start(); - try - { - var response = await _batchEndpointRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Lists batch Inference Endpoint keys. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys - /// Operation Id: BatchEndpoints_ListKeys - /// - /// The cancellation token to use. - public virtual Response GetKeys(CancellationToken cancellationToken = default) - { - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.GetKeys"); - scope.Start(); - try - { - var response = _batchEndpointRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _batchEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new BatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _batchEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new BatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _batchEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new BatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _batchEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new BatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _batchEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new BatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} - /// Operation Id: BatchEndpoints_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _batchEndpointClientDiagnostics.CreateScope("BatchEndpointResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _batchEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new BatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerCollection.cs deleted file mode 100644 index a94be967804a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerCollection.cs +++ /dev/null @@ -1,335 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetCodeContainers method from an instance of . - /// - public partial class CodeContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _codeContainerClientDiagnostics; - private readonly CodeContainersRestOperations _codeContainerRestClient; - - /// Initializes a new instance of the class for mocking. - protected CodeContainerCollection() - { - } - - /// 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 CodeContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _codeContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", CodeContainerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CodeContainerResource.ResourceType, out string codeContainerApiVersion); - _codeContainerRestClient = new CodeContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, codeContainerApiVersion); -#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 container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_CreateOrUpdate - /// - /// 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. - /// Container name. This is case-sensitive. - /// Container entity to create or update. - /// 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 name, CodeContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_CreateOrUpdate - /// - /// 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. - /// Container name. This is case-sensitive. - /// Container entity to create or update. - /// 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 name, CodeContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _codeContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.Get"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CodeContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.Get"); - scope.Start(); - try - { - var response = _codeContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CodeContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes - /// Operation Id: CodeContainers_List - /// - /// 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 GetAllAsync(string skip = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new CodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new CodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes - /// Operation Id: CodeContainers_List - /// - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _codeContainerRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new CodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _codeContainerRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new CodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.Exists"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/codes/{name} - /// Operation Id: CodeContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerCollection.Exists"); - scope.Start(); - try - { - var response = _codeContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/CodeContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerData.cs deleted file mode 100644 index e222831e7739..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the CodeContainer data model. - public partial class CodeContainerData : ResourceData - { - /// Initializes a new instance of CodeContainerData. - /// [Required] Additional attributes of the entity. - /// is null. - public CodeContainerData(CodeContainerProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of CodeContainerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal CodeContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CodeContainerProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public CodeContainerProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerResource.cs deleted file mode 100644 index 086523e0f28e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeContainerResource.cs +++ /dev/null @@ -1,286 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a CodeContainer 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 GetCodeContainerResource method. - /// Otherwise you can get one from its parent resource using the GetCodeContainer method. - /// - public partial class CodeContainerResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _codeContainerClientDiagnostics; - private readonly CodeContainersRestOperations _codeContainerRestClient; - private readonly CodeContainerData _data; - - /// Initializes a new instance of the class for mocking. - protected CodeContainerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CodeContainerResource(ArmClient client, CodeContainerData 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 CodeContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _codeContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string codeContainerApiVersion); - _codeContainerRestClient = new CodeContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, codeContainerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/codes"; - - /// 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 CodeContainerData 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 CodeVersionResources in the CodeContainer. - /// An object representing collection of CodeVersionResources and their operations over a CodeVersionResource. - public virtual CodeVersionCollection GetCodeVersions() - { - return GetCachedClient(Client => new CodeVersionCollection(Client, Id)); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetCodeVersionAsync(string version, CancellationToken cancellationToken = default) - { - return await GetCodeVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetCodeVersion(string version, CancellationToken cancellationToken = default) - { - return GetCodeVersions().Get(version, cancellationToken); - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerResource.Get"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.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 CodeContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerResource.Get"); - scope.Start(); - try - { - var response = _codeContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CodeContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Delete - /// - /// 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 = _codeContainerClientDiagnostics.CreateScope("CodeContainerResource.Delete"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_Delete - /// - /// 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 = _codeContainerClientDiagnostics.CreateScope("CodeContainerResource.Delete"); - scope.Start(); - try - { - var response = _codeContainerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CodeContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerResource.Update"); - scope.Start(); - try - { - var response = await _codeContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} - /// Operation Id: CodeContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CodeContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeContainerClientDiagnostics.CreateScope("CodeContainerResource.Update"); - scope.Start(); - try - { - var response = _codeContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeContainerResource(Client, response), response.GetRawResponse())); - 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/CodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionCollection.cs deleted file mode 100644 index 85f2a6d29b2f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionCollection.cs +++ /dev/null @@ -1,339 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetCodeVersions method from an instance of . - /// - public partial class CodeVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _codeVersionClientDiagnostics; - private readonly CodeVersionsRestOperations _codeVersionRestClient; - - /// Initializes a new instance of the class for mocking. - protected CodeVersionCollection() - { - } - - /// 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 CodeVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _codeVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", CodeVersionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(CodeVersionResource.ResourceType, out string codeVersionApiVersion); - _codeVersionRestClient = new CodeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, codeVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != CodeContainerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CodeContainerResource.ResourceType), nameof(id)); - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. This is case-sensitive. - /// Version entity to create or update. - /// 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 version, CodeVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. This is case-sensitive. - /// Version entity to create or update. - /// 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 version, CodeVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _codeVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.Get"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CodeVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.Get"); - scope.Start(); - try - { - var response = _codeVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new CodeVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions - /// Operation Id: CodeVersions_List - /// - /// Ordering of list. - /// Maximum number of records to return. - /// 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 GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new CodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new CodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions - /// Operation Id: CodeVersions_List - /// - /// Ordering of list. - /// Maximum number of records to return. - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _codeVersionRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new CodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _codeVersionRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new CodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.Exists"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionCollection.Exists"); - scope.Start(); - try - { - var response = _codeVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/CodeVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionData.cs deleted file mode 100644 index 2b1fbec27cdf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the CodeVersion data model. - public partial class CodeVersionData : ResourceData - { - /// Initializes a new instance of CodeVersionData. - /// [Required] Additional attributes of the entity. - /// is null. - public CodeVersionData(CodeVersionProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of CodeVersionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal CodeVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CodeVersionProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public CodeVersionProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionResource.cs deleted file mode 100644 index 34b292de976f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/CodeVersionResource.cs +++ /dev/null @@ -1,249 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a CodeVersion 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 GetCodeVersionResource method. - /// Otherwise you can get one from its parent resource using the GetCodeVersion method. - /// - public partial class CodeVersionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _codeVersionClientDiagnostics; - private readonly CodeVersionsRestOperations _codeVersionRestClient; - private readonly CodeVersionData _data; - - /// Initializes a new instance of the class for mocking. - protected CodeVersionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal CodeVersionResource(ArmClient client, CodeVersionData 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 CodeVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _codeVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string codeVersionApiVersion); - _codeVersionRestClient = new CodeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, codeVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/codes/versions"; - - /// 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 CodeVersionData 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 version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionResource.Get"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.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 CodeVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionResource.Get"); - scope.Start(); - try - { - var response = _codeVersionRestClient.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 CodeVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Delete - /// - /// 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 = _codeVersionClientDiagnostics.CreateScope("CodeVersionResource.Delete"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_Delete - /// - /// 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 = _codeVersionClientDiagnostics.CreateScope("CodeVersionResource.Delete"); - scope.Start(); - try - { - var response = _codeVersionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CodeVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionResource.Update"); - scope.Start(); - try - { - var response = await _codeVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} - /// Operation Id: CodeVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CodeVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _codeVersionClientDiagnostics.CreateScope("CodeVersionResource.Update"); - scope.Start(); - try - { - var response = _codeVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new CodeVersionResource(Client, response), response.GetRawResponse())); - 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/ComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerCollection.cs deleted file mode 100644 index fa2a2e4b9323..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerCollection.cs +++ /dev/null @@ -1,338 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetComponentContainers method from an instance of . - /// - public partial class ComponentContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _componentContainerClientDiagnostics; - private readonly ComponentContainersRestOperations _componentContainerRestClient; - - /// Initializes a new instance of the class for mocking. - protected ComponentContainerCollection() - { - } - - /// 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 ComponentContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _componentContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ComponentContainerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ComponentContainerResource.ResourceType, out string componentContainerApiVersion); - _componentContainerRestClient = new ComponentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, componentContainerApiVersion); -#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 container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_CreateOrUpdate - /// - /// 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. - /// Container name. - /// Container entity to create or update. - /// 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 name, ComponentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_CreateOrUpdate - /// - /// 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. - /// Container name. - /// Container entity to create or update. - /// 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 name, ComponentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _componentContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.Get"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ComponentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.Get"); - scope.Start(); - try - { - var response = _componentContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ComponentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List component containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components - /// Operation Id: ComponentContainers_List - /// - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List component containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components - /// Operation Id: ComponentContainers_List - /// - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _componentContainerRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _componentContainerRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.Exists"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/components/{name} - /// Operation Id: ComponentContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerCollection.Exists"); - scope.Start(); - try - { - var response = _componentContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/ComponentContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerData.cs deleted file mode 100644 index 9c4d61ac979b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the ComponentContainer data model. - public partial class ComponentContainerData : ResourceData - { - /// Initializes a new instance of ComponentContainerData. - /// [Required] Additional attributes of the entity. - /// is null. - public ComponentContainerData(ComponentContainerProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of ComponentContainerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal ComponentContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ComponentContainerProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public ComponentContainerProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerResource.cs deleted file mode 100644 index df3bcda5a88a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentContainerResource.cs +++ /dev/null @@ -1,286 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a ComponentContainer 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 GetComponentContainerResource method. - /// Otherwise you can get one from its parent resource using the GetComponentContainer method. - /// - public partial class ComponentContainerResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _componentContainerClientDiagnostics; - private readonly ComponentContainersRestOperations _componentContainerRestClient; - private readonly ComponentContainerData _data; - - /// Initializes a new instance of the class for mocking. - protected ComponentContainerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ComponentContainerResource(ArmClient client, ComponentContainerData 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 ComponentContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _componentContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string componentContainerApiVersion); - _componentContainerRestClient = new ComponentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, componentContainerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/components"; - - /// 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 ComponentContainerData 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 ComponentVersionResources in the ComponentContainer. - /// An object representing collection of ComponentVersionResources and their operations over a ComponentVersionResource. - public virtual ComponentVersionCollection GetComponentVersions() - { - return GetCachedClient(Client => new ComponentVersionCollection(Client, Id)); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetComponentVersionAsync(string version, CancellationToken cancellationToken = default) - { - return await GetComponentVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetComponentVersion(string version, CancellationToken cancellationToken = default) - { - return GetComponentVersions().Get(version, cancellationToken); - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerResource.Get"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.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 ComponentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerResource.Get"); - scope.Start(); - try - { - var response = _componentContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ComponentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Delete - /// - /// 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 = _componentContainerClientDiagnostics.CreateScope("ComponentContainerResource.Delete"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_Delete - /// - /// 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 = _componentContainerClientDiagnostics.CreateScope("ComponentContainerResource.Delete"); - scope.Start(); - try - { - var response = _componentContainerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ComponentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerResource.Update"); - scope.Start(); - try - { - var response = await _componentContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} - /// Operation Id: ComponentContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ComponentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentContainerClientDiagnostics.CreateScope("ComponentContainerResource.Update"); - scope.Start(); - try - { - var response = _componentContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentContainerResource(Client, response), response.GetRawResponse())); - 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/ComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionCollection.cs deleted file mode 100644 index caf35895b0fb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionCollection.cs +++ /dev/null @@ -1,342 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetComponentVersions method from an instance of . - /// - public partial class ComponentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _componentVersionClientDiagnostics; - private readonly ComponentVersionsRestOperations _componentVersionRestClient; - - /// Initializes a new instance of the class for mocking. - protected ComponentVersionCollection() - { - } - - /// 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 ComponentVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _componentVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ComponentVersionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ComponentVersionResource.ResourceType, out string componentVersionApiVersion); - _componentVersionRestClient = new ComponentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, componentVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ComponentContainerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ComponentContainerResource.ResourceType), nameof(id)); - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. - /// Version entity to create or update. - /// 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 version, ComponentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. - /// Version entity to create or update. - /// 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 version, ComponentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _componentVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.Get"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ComponentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.Get"); - scope.Start(); - try - { - var response = _componentVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ComponentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List component versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions - /// Operation Id: ComponentVersions_List - /// - /// Ordering of list. - /// Maximum number of records to return. - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List component versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions - /// Operation Id: ComponentVersions_List - /// - /// Ordering of list. - /// Maximum number of records to return. - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _componentVersionRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _componentVersionRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.Exists"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionCollection.Exists"); - scope.Start(); - try - { - var response = _componentVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/ComponentVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionData.cs deleted file mode 100644 index f611be913025..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the ComponentVersion data model. - public partial class ComponentVersionData : ResourceData - { - /// Initializes a new instance of ComponentVersionData. - /// [Required] Additional attributes of the entity. - /// is null. - public ComponentVersionData(ComponentVersionProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of ComponentVersionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal ComponentVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ComponentVersionProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public ComponentVersionProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionResource.cs deleted file mode 100644 index 5c4b6f1d38c6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ComponentVersionResource.cs +++ /dev/null @@ -1,249 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a ComponentVersion 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 GetComponentVersionResource method. - /// Otherwise you can get one from its parent resource using the GetComponentVersion method. - /// - public partial class ComponentVersionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _componentVersionClientDiagnostics; - private readonly ComponentVersionsRestOperations _componentVersionRestClient; - private readonly ComponentVersionData _data; - - /// Initializes a new instance of the class for mocking. - protected ComponentVersionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ComponentVersionResource(ArmClient client, ComponentVersionData 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 ComponentVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _componentVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string componentVersionApiVersion); - _componentVersionRestClient = new ComponentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, componentVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/components/versions"; - - /// 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 ComponentVersionData 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 version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionResource.Get"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.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 ComponentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionResource.Get"); - scope.Start(); - try - { - var response = _componentVersionRestClient.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 ComponentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Delete - /// - /// 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 = _componentVersionClientDiagnostics.CreateScope("ComponentVersionResource.Delete"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_Delete - /// - /// 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 = _componentVersionClientDiagnostics.CreateScope("ComponentVersionResource.Delete"); - scope.Start(); - try - { - var response = _componentVersionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ComponentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionResource.Update"); - scope.Start(); - try - { - var response = await _componentVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} - /// Operation Id: ComponentVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ComponentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _componentVersionClientDiagnostics.CreateScope("ComponentVersionResource.Update"); - scope.Start(); - try - { - var response = _componentVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ComponentVersionResource(Client, response), response.GetRawResponse())); - 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/DataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerCollection.cs deleted file mode 100644 index f3f89def9884..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerCollection.cs +++ /dev/null @@ -1,338 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetDataContainers method from an instance of . - /// - public partial class DataContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataContainerClientDiagnostics; - private readonly DataContainersRestOperations _dataContainerRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataContainerCollection() - { - } - - /// 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 DataContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", DataContainerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataContainerResource.ResourceType, out string dataContainerApiVersion); - _dataContainerRestClient = new DataContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataContainerApiVersion); -#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 container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_CreateOrUpdate - /// - /// 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. - /// Container name. - /// Container entity to create or update. - /// 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 name, DataContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_CreateOrUpdate - /// - /// 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. - /// Container name. - /// Container entity to create or update. - /// 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 name, DataContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.Get"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.Get"); - scope.Start(); - try - { - var response = _dataContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List data containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data - /// Operation Id: DataContainers_List - /// - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List data containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data - /// Operation Id: DataContainers_List - /// - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _dataContainerRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _dataContainerRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.Exists"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/data/{name} - /// Operation Id: DataContainers_Get - /// - /// Container name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerCollection.Exists"); - scope.Start(); - try - { - var response = _dataContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/DataContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerData.cs deleted file mode 100644 index a9a791d470bd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the DataContainer data model. - public partial class DataContainerData : ResourceData - { - /// Initializes a new instance of DataContainerData. - /// [Required] Additional attributes of the entity. - /// is null. - public DataContainerData(DataContainerProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataContainerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal DataContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataContainerProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public DataContainerProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs deleted file mode 100644 index 7ad4cb9cd28c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataContainerResource.cs +++ /dev/null @@ -1,286 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a DataContainer 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 GetDataContainerResource method. - /// Otherwise you can get one from its parent resource using the GetDataContainer method. - /// - public partial class DataContainerResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataContainerClientDiagnostics; - private readonly DataContainersRestOperations _dataContainerRestClient; - private readonly DataContainerData _data; - - /// Initializes a new instance of the class for mocking. - protected DataContainerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataContainerResource(ArmClient client, DataContainerData 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 DataContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataContainerApiVersion); - _dataContainerRestClient = new DataContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataContainerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/data"; - - /// 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 DataContainerData 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 DataVersionResources in the DataContainer. - /// An object representing collection of DataVersionResources and their operations over a DataVersionResource. - public virtual DataVersionCollection GetDataVersions() - { - return GetCachedClient(Client => new DataVersionCollection(Client, Id)); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDataVersionAsync(string version, CancellationToken cancellationToken = default) - { - return await GetDataVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDataVersion(string version, CancellationToken cancellationToken = default) - { - return GetDataVersions().Get(version, cancellationToken); - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerResource.Get"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.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 DataContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerResource.Get"); - scope.Start(); - try - { - var response = _dataContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Delete - /// - /// 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 = _dataContainerClientDiagnostics.CreateScope("DataContainerResource.Delete"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_Delete - /// - /// 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 = _dataContainerClientDiagnostics.CreateScope("DataContainerResource.Delete"); - scope.Start(); - try - { - var response = _dataContainerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerResource.Update"); - scope.Start(); - try - { - var response = await _dataContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} - /// Operation Id: DataContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataContainerClientDiagnostics.CreateScope("DataContainerResource.Update"); - scope.Start(); - try - { - var response = _dataContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataContainerResource(Client, response), response.GetRawResponse())); - 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/DataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionCollection.cs deleted file mode 100644 index e145ce6a052b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionCollection.cs +++ /dev/null @@ -1,350 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetDataVersions method from an instance of . - /// - public partial class DataVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _dataVersionClientDiagnostics; - private readonly DataVersionsRestOperations _dataVersionRestClient; - - /// Initializes a new instance of the class for mocking. - protected DataVersionCollection() - { - } - - /// 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 DataVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", DataVersionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DataVersionResource.ResourceType, out string dataVersionApiVersion); - _dataVersionRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != DataContainerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, DataContainerResource.ResourceType), nameof(id)); - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. - /// Version entity to create or update. - /// 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 version, DataVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. - /// Version entity to create or update. - /// 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 version, DataVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _dataVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Get"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Get"); - scope.Start(); - try - { - var response = _dataVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DataVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List data versions in the data container - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions - /// Operation Id: DataVersions_List - /// - /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. - /// - /// Top count of results, top count cannot be greater than the page size. - /// If topCount > page size, results with be default page size count will be returned - /// - /// Continuation token for pagination. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List data versions in the data container - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions - /// Operation Id: DataVersions_List - /// - /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. - /// - /// Top count of results, top count cannot be greater than the page size. - /// If topCount > page size, results with be default page size count will be returned - /// - /// Continuation token for pagination. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _dataVersionRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _dataVersionRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Exists"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// Version identifier. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionCollection.Exists"); - scope.Start(); - try - { - var response = _dataVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/DataVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionData.cs deleted file mode 100644 index 0b7154475c73..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionData.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the DataVersion data model. - public partial class DataVersionData : ResourceData - { - /// Initializes a new instance of DataVersionData. - /// - /// [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 . - /// - /// is null. - public DataVersionData(DataVersionProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DataVersionData. - /// 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 . - /// - internal DataVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataVersionProperties properties) : base(id, name, resourceType, systemData) - { - Properties = 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 . - /// - public DataVersionProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionResource.cs deleted file mode 100644 index 8ccd408982f8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DataVersionResource.cs +++ /dev/null @@ -1,249 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a DataVersion 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 GetDataVersionResource method. - /// Otherwise you can get one from its parent resource using the GetDataVersion method. - /// - public partial class DataVersionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _dataVersionClientDiagnostics; - private readonly DataVersionsRestOperations _dataVersionRestClient; - private readonly DataVersionData _data; - - /// Initializes a new instance of the class for mocking. - protected DataVersionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DataVersionResource(ArmClient client, DataVersionData 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 DataVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _dataVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string dataVersionApiVersion); - _dataVersionRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/data/versions"; - - /// 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 DataVersionData 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 version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Get"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.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 DataVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Get"); - scope.Start(); - try - { - var response = _dataVersionRestClient.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 DataVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Delete - /// - /// 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 = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Delete"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_Delete - /// - /// 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 = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Delete"); - scope.Start(); - try - { - var response = _dataVersionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Update"); - scope.Start(); - try - { - var response = await _dataVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} - /// Operation Id: DataVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DataVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _dataVersionClientDiagnostics.CreateScope("DataVersionResource.Update"); - scope.Start(); - try - { - var response = _dataVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DataVersionResource(Client, response), response.GetRawResponse())); - 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/DatastoreCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreCollection.cs deleted file mode 100644 index 2e5c481b1ac0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreCollection.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.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetDatastores method from an instance of . - /// - public partial class DatastoreCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _datastoreClientDiagnostics; - private readonly DatastoresRestOperations _datastoreRestClient; - - /// Initializes a new instance of the class for mocking. - protected DatastoreCollection() - { - } - - /// 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 DatastoreCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _datastoreClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", DatastoreResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(DatastoreResource.ResourceType, out string datastoreApiVersion); - _datastoreRestClient = new DatastoresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datastoreApiVersion); -#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 datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_CreateOrUpdate - /// - /// 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. - /// Datastore name. - /// Datastore entity to create or update. - /// Flag to skip validation. - /// 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 name, DatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _datastoreRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, skipValidation, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DatastoreResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_CreateOrUpdate - /// - /// 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. - /// Datastore name. - /// Datastore entity to create or update. - /// Flag to skip validation. - /// 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 name, DatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _datastoreRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, skipValidation, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DatastoreResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Get - /// - /// Datastore name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.Get"); - scope.Start(); - try - { - var response = await _datastoreRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatastoreResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Get - /// - /// Datastore name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.Get"); - scope.Start(); - try - { - var response = _datastoreRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatastoreResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List datastores. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores - /// Operation Id: Datastores_List - /// - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.GetAll"); - scope.Start(); - try - { - var response = await _datastoreRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.GetAll"); - scope.Start(); - try - { - var response = await _datastoreRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new DatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List datastores. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores - /// Operation Id: Datastores_List - /// - /// Continuation token for pagination. - /// Maximum number of results to return. - /// Filter down to the workspace default datastore. - /// Names of datastores to return. - /// Text to search for in the datastore names. - /// Order by property (createdtime | modifiedtime | name). - /// Order by property in ascending order. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.GetAll"); - scope.Start(); - try - { - var response = _datastoreRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.GetAll"); - scope.Start(); - try - { - var response = _datastoreRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new DatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Get - /// - /// Datastore name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.Exists"); - scope.Start(); - try - { - var response = await _datastoreRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/datastores/{name} - /// Operation Id: Datastores_Get - /// - /// Datastore name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreCollection.Exists"); - scope.Start(); - try - { - var response = _datastoreRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/DatastoreData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreData.cs deleted file mode 100644 index da8dd1f6a651..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreData.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the Datastore data model. - public partial class DatastoreData : ResourceData - { - /// Initializes a new instance of DatastoreData. - /// - /// [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 . - /// - /// is null. - public DatastoreData(DatastoreProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of DatastoreData. - /// 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 . - /// - internal DatastoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DatastoreProperties properties) : base(id, name, resourceType, systemData) - { - Properties = 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 . - /// - public DatastoreProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreResource.cs deleted file mode 100644 index 4a1aab07be08..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/DatastoreResource.cs +++ /dev/null @@ -1,296 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a Datastore 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 GetDatastoreResource method. - /// Otherwise you can get one from its parent resource using the GetDatastore method. - /// - public partial class DatastoreResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _datastoreClientDiagnostics; - private readonly DatastoresRestOperations _datastoreRestClient; - private readonly DatastoreData _data; - - /// Initializes a new instance of the class for mocking. - protected DatastoreResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal DatastoreResource(ArmClient client, DatastoreData 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 DatastoreResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _datastoreClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string datastoreApiVersion); - _datastoreRestClient = new DatastoresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, datastoreApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/datastores"; - - /// 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 DatastoreData 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 datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreResource.Get"); - scope.Start(); - try - { - var response = await _datastoreRestClient.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 DatastoreResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreResource.Get"); - scope.Start(); - try - { - var response = _datastoreRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new DatastoreResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Delete - /// - /// 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 = _datastoreClientDiagnostics.CreateScope("DatastoreResource.Delete"); - scope.Start(); - try - { - var response = await _datastoreRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_Delete - /// - /// 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 = _datastoreClientDiagnostics.CreateScope("DatastoreResource.Delete"); - scope.Start(); - try - { - var response = _datastoreRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_CreateOrUpdate - /// - /// 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. - /// Datastore entity to create or update. - /// Flag to skip validation. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, DatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreResource.Update"); - scope.Start(); - try - { - var response = await _datastoreRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, skipValidation, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new DatastoreResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update datastore. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} - /// Operation Id: Datastores_CreateOrUpdate - /// - /// 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. - /// Datastore entity to create or update. - /// Flag to skip validation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, DatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreResource.Update"); - scope.Start(); - try - { - var response = _datastoreRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, skipValidation, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new DatastoreResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get datastore secrets. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets - /// Operation Id: Datastores_ListSecrets - /// - /// The cancellation token to use. - public virtual async Task> GetSecretsAsync(CancellationToken cancellationToken = default) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreResource.GetSecrets"); - scope.Start(); - try - { - var response = await _datastoreRestClient.ListSecretsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get datastore secrets. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets - /// Operation Id: Datastores_ListSecrets - /// - /// The cancellation token to use. - public virtual Response GetSecrets(CancellationToken cancellationToken = default) - { - using var scope = _datastoreClientDiagnostics.CreateScope("DatastoreResource.GetSecrets"); - scope.Start(); - try - { - var response = _datastoreRestClient.ListSecrets(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerCollection.cs deleted file mode 100644 index 818ca24f247c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerCollection.cs +++ /dev/null @@ -1,338 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 GetEnvironmentContainers method from an instance of . - /// - public partial class EnvironmentContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _environmentContainerClientDiagnostics; - private readonly EnvironmentContainersRestOperations _environmentContainerRestClient; - - /// Initializes a new instance of the class for mocking. - protected EnvironmentContainerCollection() - { - } - - /// 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 EnvironmentContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _environmentContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", EnvironmentContainerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EnvironmentContainerResource.ResourceType, out string environmentContainerApiVersion); - _environmentContainerRestClient = new EnvironmentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, environmentContainerApiVersion); -#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 container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_CreateOrUpdate - /// - /// 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. - /// Container name. This is case-sensitive. - /// Container entity to create or update. - /// 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 name, EnvironmentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_CreateOrUpdate - /// - /// 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. - /// Container name. This is case-sensitive. - /// Container entity to create or update. - /// 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 name, EnvironmentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.Get"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.Get"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List environment containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments - /// Operation Id: EnvironmentContainers_List - /// - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List environment containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments - /// Operation Id: EnvironmentContainers_List - /// - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.Exists"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/environments/{name} - /// Operation Id: EnvironmentContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerCollection.Exists"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/EnvironmentContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerData.cs deleted file mode 100644 index 7aa2a49d6b9b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the EnvironmentContainer data model. - public partial class EnvironmentContainerData : ResourceData - { - /// Initializes a new instance of EnvironmentContainerData. - /// [Required] Additional attributes of the entity. - /// is null. - public EnvironmentContainerData(EnvironmentContainerProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of EnvironmentContainerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal EnvironmentContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EnvironmentContainerProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public EnvironmentContainerProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerResource.cs deleted file mode 100644 index b75da97a2e93..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentContainerResource.cs +++ /dev/null @@ -1,286 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing an EnvironmentContainer 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 GetEnvironmentContainerResource method. - /// Otherwise you can get one from its parent resource using the GetEnvironmentContainer method. - /// - public partial class EnvironmentContainerResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _environmentContainerClientDiagnostics; - private readonly EnvironmentContainersRestOperations _environmentContainerRestClient; - private readonly EnvironmentContainerData _data; - - /// Initializes a new instance of the class for mocking. - protected EnvironmentContainerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal EnvironmentContainerResource(ArmClient client, EnvironmentContainerData 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 EnvironmentContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _environmentContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string environmentContainerApiVersion); - _environmentContainerRestClient = new EnvironmentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, environmentContainerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/environments"; - - /// 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 EnvironmentContainerData 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 EnvironmentVersionResources in the EnvironmentContainer. - /// An object representing collection of EnvironmentVersionResources and their operations over a EnvironmentVersionResource. - public virtual EnvironmentVersionCollection GetEnvironmentVersions() - { - return GetCachedClient(Client => new EnvironmentVersionCollection(Client, Id)); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetEnvironmentVersionAsync(string version, CancellationToken cancellationToken = default) - { - return await GetEnvironmentVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetEnvironmentVersion(string version, CancellationToken cancellationToken = default) - { - return GetEnvironmentVersions().Get(version, cancellationToken); - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerResource.Get"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.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 EnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerResource.Get"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Delete - /// - /// 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 = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerResource.Delete"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_Delete - /// - /// 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 = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerResource.Delete"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, EnvironmentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerResource.Update"); - scope.Start(); - try - { - var response = await _environmentContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} - /// Operation Id: EnvironmentContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, EnvironmentContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentContainerClientDiagnostics.CreateScope("EnvironmentContainerResource.Update"); - scope.Start(); - try - { - var response = _environmentContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentContainerResource(Client, response), response.GetRawResponse())); - 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/EnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionCollection.cs deleted file mode 100644 index 5c4745bfdf9d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionCollection.cs +++ /dev/null @@ -1,342 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 GetEnvironmentVersions method from an instance of . - /// - public partial class EnvironmentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _environmentVersionClientDiagnostics; - private readonly EnvironmentVersionsRestOperations _environmentVersionRestClient; - - /// Initializes a new instance of the class for mocking. - protected EnvironmentVersionCollection() - { - } - - /// 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 EnvironmentVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _environmentVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", EnvironmentVersionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(EnvironmentVersionResource.ResourceType, out string environmentVersionApiVersion); - _environmentVersionRestClient = new EnvironmentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, environmentVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != EnvironmentContainerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, EnvironmentContainerResource.ResourceType), nameof(id)); - } - - /// - /// Creates or updates an EnvironmentVersion. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_CreateOrUpdate - /// - /// 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. - /// Version of EnvironmentVersion. - /// Definition of EnvironmentVersion. - /// 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 version, EnvironmentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates an EnvironmentVersion. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_CreateOrUpdate - /// - /// 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. - /// Version of EnvironmentVersion. - /// Definition of EnvironmentVersion. - /// 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 version, EnvironmentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.Get"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.Get"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new EnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions - /// Operation Id: EnvironmentVersions_List - /// - /// Ordering of list. - /// Maximum number of records to return. - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions - /// Operation Id: EnvironmentVersions_List - /// - /// Ordering of list. - /// Maximum number of records to return. - /// Continuation token for pagination. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new EnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.Exists"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionCollection.Exists"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/EnvironmentVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionData.cs deleted file mode 100644 index cad24d6991b0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the EnvironmentVersion data model. - public partial class EnvironmentVersionData : ResourceData - { - /// Initializes a new instance of EnvironmentVersionData. - /// [Required] Additional attributes of the entity. - /// is null. - public EnvironmentVersionData(EnvironmentVersionProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of EnvironmentVersionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal EnvironmentVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, EnvironmentVersionProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public EnvironmentVersionProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionResource.cs deleted file mode 100644 index 3280ceee671d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/EnvironmentVersionResource.cs +++ /dev/null @@ -1,249 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing an EnvironmentVersion 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 GetEnvironmentVersionResource method. - /// Otherwise you can get one from its parent resource using the GetEnvironmentVersion method. - /// - public partial class EnvironmentVersionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _environmentVersionClientDiagnostics; - private readonly EnvironmentVersionsRestOperations _environmentVersionRestClient; - private readonly EnvironmentVersionData _data; - - /// Initializes a new instance of the class for mocking. - protected EnvironmentVersionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal EnvironmentVersionResource(ArmClient client, EnvironmentVersionData 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 EnvironmentVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _environmentVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string environmentVersionApiVersion); - _environmentVersionRestClient = new EnvironmentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, environmentVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/environments/versions"; - - /// 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 EnvironmentVersionData 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 version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionResource.Get"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.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 EnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionResource.Get"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.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 EnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Delete - /// - /// 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 = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionResource.Delete"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_Delete - /// - /// 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 = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionResource.Delete"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates an EnvironmentVersion. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_CreateOrUpdate - /// - /// 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. - /// Definition of EnvironmentVersion. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, EnvironmentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionResource.Update"); - scope.Start(); - try - { - var response = await _environmentVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Creates or updates an EnvironmentVersion. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} - /// Operation Id: EnvironmentVersions_CreateOrUpdate - /// - /// 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. - /// Definition of EnvironmentVersion. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, EnvironmentVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _environmentVersionClientDiagnostics.CreateScope("EnvironmentVersionResource.Update"); - scope.Start(); - try - { - var response = _environmentVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new EnvironmentVersionResource(Client, response), response.GetRawResponse())); - 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/Extensions/MachineLearningExtensions.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs index c13cf463e111..124d83f2ed40 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/MachineLearningExtensions.cs @@ -65,9 +65,9 @@ public static Pageable GetMachineLearningWorks /// The location for which resource usage is queried. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetUsagesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static AsyncPageable GetMachineLearningUsagesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetUsagesAsync(location, cancellationToken); + return GetExtensionClient(subscriptionResource).GetMachineLearningUsagesAsync(location, cancellationToken); } /// @@ -79,9 +79,9 @@ public static AsyncPageable GetUsagesAsync(this Subscripti /// The location for which resource usage is queried. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetUsages(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static Pageable GetMachineLearningUsages(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetUsages(location, cancellationToken); + return GetExtensionClient(subscriptionResource).GetMachineLearningUsages(location, cancellationToken); } /// @@ -92,10 +92,10 @@ public static Pageable GetUsages(this SubscriptionResource /// The instance the method will execute against. /// The location upon which virtual-machine-sizes is queried. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetVirtualMachineSizesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMachineLearningVmSizesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetVirtualMachineSizesAsync(location, cancellationToken); + return GetExtensionClient(subscriptionResource).GetMachineLearningVmSizesAsync(location, cancellationToken); } /// @@ -106,10 +106,10 @@ public static AsyncPageable GetVirtualMachineSizesAsync(this /// The instance the method will execute against. /// The location upon which virtual-machine-sizes is queried. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetVirtualMachineSizes(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMachineLearningVmSizes(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetVirtualMachineSizes(location, cancellationToken); + return GetExtensionClient(subscriptionResource).GetMachineLearningVmSizes(location, cancellationToken); } /// @@ -122,12 +122,12 @@ public static Pageable GetVirtualMachineSizes(this Subscript /// Quota update parameters. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable UpdateAllQuotaAsync(this SubscriptionResource subscriptionResource, AzureLocation location, QuotaUpdateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable UpdateMachineLearningQuotasAsync(this SubscriptionResource subscriptionResource, AzureLocation location, MachineLearningQuotaUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - return GetExtensionClient(subscriptionResource).UpdateAllQuotaAsync(location, content, cancellationToken); + return GetExtensionClient(subscriptionResource).UpdateMachineLearningQuotasAsync(location, content, cancellationToken); } /// @@ -140,12 +140,12 @@ public static AsyncPageable UpdateAllQuotaAsync(this Subs /// Quota update parameters. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable UpdateAllQuota(this SubscriptionResource subscriptionResource, AzureLocation location, QuotaUpdateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable UpdateMachineLearningQuotas(this SubscriptionResource subscriptionResource, AzureLocation location, MachineLearningQuotaUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - return GetExtensionClient(subscriptionResource).UpdateAllQuota(location, content, cancellationToken); + return GetExtensionClient(subscriptionResource).UpdateMachineLearningQuotas(location, content, cancellationToken); } /// @@ -156,10 +156,10 @@ public static Pageable UpdateAllQuota(this SubscriptionRe /// The instance the method will execute against. /// The location for which resource usage is queried. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAllQuotaAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetMachineLearningQuotasAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetAllQuotaAsync(location, cancellationToken); + return GetExtensionClient(subscriptionResource).GetMachineLearningQuotasAsync(location, cancellationToken); } /// @@ -170,10 +170,10 @@ public static AsyncPageable GetAllQuotaAsync(this SubscriptionRes /// The instance the method will execute against. /// The location for which resource usage is queried. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAllQuota(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetMachineLearningQuotas(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetAllQuota(location, cancellationToken); + return GetExtensionClient(subscriptionResource).GetMachineLearningQuotas(location, cancellationToken); } private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource) @@ -282,229 +282,229 @@ public static MachineLearningPrivateEndpointConnectionResource GetMachineLearnin } #endregion - #region WorkspaceConnectionPropertiesV2BasicResource + #region MachineLearningWorkspaceConnectionResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static WorkspaceConnectionPropertiesV2BasicResource GetWorkspaceConnectionPropertiesV2BasicResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningWorkspaceConnectionResource GetMachineLearningWorkspaceConnectionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - WorkspaceConnectionPropertiesV2BasicResource.ValidateResourceId(id); - return new WorkspaceConnectionPropertiesV2BasicResource(client, id); + MachineLearningWorkspaceConnectionResource.ValidateResourceId(id); + return new MachineLearningWorkspaceConnectionResource(client, id); } ); } #endregion - #region BatchEndpointResource + #region MachineLearningBatchEndpointResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static BatchEndpointResource GetBatchEndpointResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningBatchEndpointResource GetMachineLearningBatchEndpointResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BatchEndpointResource.ValidateResourceId(id); - return new BatchEndpointResource(client, id); + MachineLearningBatchEndpointResource.ValidateResourceId(id); + return new MachineLearningBatchEndpointResource(client, id); } ); } #endregion - #region BatchDeploymentResource + #region MachineLearningBatchDeploymentResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static BatchDeploymentResource GetBatchDeploymentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningBatchDeploymentResource GetMachineLearningBatchDeploymentResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - BatchDeploymentResource.ValidateResourceId(id); - return new BatchDeploymentResource(client, id); + MachineLearningBatchDeploymentResource.ValidateResourceId(id); + return new MachineLearningBatchDeploymentResource(client, id); } ); } #endregion - #region CodeContainerResource + #region MachineLearningCodeContainerResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static CodeContainerResource GetCodeContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningCodeContainerResource GetMachineLearningCodeContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - CodeContainerResource.ValidateResourceId(id); - return new CodeContainerResource(client, id); + MachineLearningCodeContainerResource.ValidateResourceId(id); + return new MachineLearningCodeContainerResource(client, id); } ); } #endregion - #region CodeVersionResource + #region MachineLearningCodeVersionResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static CodeVersionResource GetCodeVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningCodeVersionResource GetMachineLearningCodeVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - CodeVersionResource.ValidateResourceId(id); - return new CodeVersionResource(client, id); + MachineLearningCodeVersionResource.ValidateResourceId(id); + return new MachineLearningCodeVersionResource(client, id); } ); } #endregion - #region ComponentContainerResource + #region MachineLearningComponentContainerResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ComponentContainerResource GetComponentContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningComponentContainerResource GetMachineLearningComponentContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ComponentContainerResource.ValidateResourceId(id); - return new ComponentContainerResource(client, id); + MachineLearningComponentContainerResource.ValidateResourceId(id); + return new MachineLearningComponentContainerResource(client, id); } ); } #endregion - #region ComponentVersionResource + #region MachineLearningComponentVersionResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ComponentVersionResource GetComponentVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningComponentVersionResource GetMachineLearningComponentVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ComponentVersionResource.ValidateResourceId(id); - return new ComponentVersionResource(client, id); + MachineLearningComponentVersionResource.ValidateResourceId(id); + return new MachineLearningComponentVersionResource(client, id); } ); } #endregion - #region DataContainerResource + #region MachineLearningDataContainerResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DataContainerResource GetDataContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningDataContainerResource GetMachineLearningDataContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DataContainerResource.ValidateResourceId(id); - return new DataContainerResource(client, id); + MachineLearningDataContainerResource.ValidateResourceId(id); + return new MachineLearningDataContainerResource(client, id); } ); } #endregion - #region DataVersionResource + #region MachineLearningDataVersionResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DataVersionResource GetDataVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningDataVersionResource GetMachineLearningDataVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DataVersionResource.ValidateResourceId(id); - return new DataVersionResource(client, id); + MachineLearningDataVersionResource.ValidateResourceId(id); + return new MachineLearningDataVersionResource(client, id); } ); } #endregion - #region DatastoreResource + #region MachineLearningDatastoreResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DatastoreResource GetDatastoreResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningDatastoreResource GetMachineLearningDatastoreResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DatastoreResource.ValidateResourceId(id); - return new DatastoreResource(client, id); + MachineLearningDatastoreResource.ValidateResourceId(id); + return new MachineLearningDatastoreResource(client, id); } ); } #endregion - #region EnvironmentContainerResource + #region MachineLearningEnvironmentContainerResource /// - /// 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. + /// 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static EnvironmentContainerResource GetEnvironmentContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningEnvironmentContainerResource GetMachineLearningEnvironmentContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - EnvironmentContainerResource.ValidateResourceId(id); - return new EnvironmentContainerResource(client, id); + MachineLearningEnvironmentContainerResource.ValidateResourceId(id); + return new MachineLearningEnvironmentContainerResource(client, id); } ); } #endregion - #region EnvironmentVersionResource + #region MachineLearningEnvironmentVersionResource /// - /// 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. + /// 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static EnvironmentVersionResource GetEnvironmentVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningEnvironmentVersionResource GetMachineLearningEnvironmentVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - EnvironmentVersionResource.ValidateResourceId(id); - return new EnvironmentVersionResource(client, id); + MachineLearningEnvironmentVersionResource.ValidateResourceId(id); + return new MachineLearningEnvironmentVersionResource(client, id); } ); } @@ -529,96 +529,96 @@ public static MachineLearningJobResource GetMachineLearningJobResource(this ArmC } #endregion - #region ModelContainerResource + #region MachineLearningModelContainerResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ModelContainerResource GetModelContainerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningModelContainerResource GetMachineLearningModelContainerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ModelContainerResource.ValidateResourceId(id); - return new ModelContainerResource(client, id); + MachineLearningModelContainerResource.ValidateResourceId(id); + return new MachineLearningModelContainerResource(client, id); } ); } #endregion - #region ModelVersionResource + #region MachineLearningModelVersionResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ModelVersionResource GetModelVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningModelVersionResource GetMachineLearningModelVersionResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ModelVersionResource.ValidateResourceId(id); - return new ModelVersionResource(client, id); + MachineLearningModelVersionResource.ValidateResourceId(id); + return new MachineLearningModelVersionResource(client, id); } ); } #endregion - #region OnlineEndpointResource + #region MachineLearningOnlineEndpointResource /// - /// 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. + /// 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static OnlineEndpointResource GetOnlineEndpointResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningOnlineEndpointResource GetMachineLearningOnlineEndpointResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - OnlineEndpointResource.ValidateResourceId(id); - return new OnlineEndpointResource(client, id); + MachineLearningOnlineEndpointResource.ValidateResourceId(id); + return new MachineLearningOnlineEndpointResource(client, id); } ); } #endregion - #region OnlineDeploymentResource + #region MachineLearningOnlineDeploymentResource /// - /// 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. + /// 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static OnlineDeploymentResource GetOnlineDeploymentResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningOnlineDeploymentResource GetMachineLearningOnlineDeploymentResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - OnlineDeploymentResource.ValidateResourceId(id); - return new OnlineDeploymentResource(client, id); + MachineLearningOnlineDeploymentResource.ValidateResourceId(id); + return new MachineLearningOnlineDeploymentResource(client, id); } ); } #endregion - #region ScheduleResource + #region MachineLearningScheduleResource /// - /// 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 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 instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ScheduleResource GetScheduleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MachineLearningScheduleResource GetMachineLearningScheduleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ScheduleResource.ValidateResourceId(id); - return new ScheduleResource(client, id); + MachineLearningScheduleResource.ValidateResourceId(id); + return new MachineLearningScheduleResource(client, id); } ); } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 032ef2a7ea88..f2c5d6507ad1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -150,11 +150,11 @@ Page NextPageFunc(string nextLink, int? pageSi /// The location for which resource usage is queried. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetUsagesAsync(AzureLocation location, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetMachineLearningUsagesAsync(AzureLocation location, CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetUsages"); + using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningUsages"); scope.Start(); try { @@ -169,7 +169,7 @@ async Task> FirstPageFunc(int? pageSizeHint) } async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetUsages"); + using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningUsages"); scope.Start(); try { @@ -193,11 +193,11 @@ async Task> NextPageFunc(string nextLink, int? pageSi /// The location for which resource usage is queried. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetUsages(AzureLocation location, CancellationToken cancellationToken = default) + public virtual Pageable GetMachineLearningUsages(AzureLocation location, CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { - using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetUsages"); + using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningUsages"); scope.Start(); try { @@ -212,7 +212,7 @@ Page FirstPageFunc(int? pageSizeHint) } Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetUsages"); + using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningUsages"); scope.Start(); try { @@ -235,12 +235,12 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// /// The location upon which virtual-machine-sizes is queried. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetVirtualMachineSizesAsync(AzureLocation location, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMachineLearningVmSizesAsync(AzureLocation location, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = VirtualMachineSizesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetVirtualMachineSizes"); + using var scope = VirtualMachineSizesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningVmSizes"); scope.Start(); try { @@ -263,12 +263,12 @@ async Task> FirstPageFunc(int? pageSizeHint) /// /// The location upon which virtual-machine-sizes is queried. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetVirtualMachineSizes(AzureLocation location, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMachineLearningVmSizes(AzureLocation location, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = VirtualMachineSizesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetVirtualMachineSizes"); + using var scope = VirtualMachineSizesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningVmSizes"); scope.Start(); try { @@ -292,12 +292,12 @@ Page FirstPageFunc(int? pageSizeHint) /// The location for update quota is queried. /// Quota update parameters. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable UpdateAllQuotaAsync(AzureLocation location, QuotaUpdateContent content, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable UpdateMachineLearningQuotasAsync(AzureLocation location, MachineLearningQuotaUpdateContent content, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.UpdateAllQuota"); + using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.UpdateMachineLearningQuotas"); scope.Start(); try { @@ -321,12 +321,12 @@ async Task> FirstPageFunc(int? pageSizeHint) /// The location for update quota is queried. /// Quota update parameters. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable UpdateAllQuota(AzureLocation location, QuotaUpdateContent content, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable UpdateMachineLearningQuotas(AzureLocation location, MachineLearningQuotaUpdateContent content, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.UpdateAllQuota"); + using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.UpdateMachineLearningQuotas"); scope.Start(); try { @@ -349,12 +349,12 @@ Page FirstPageFunc(int? pageSizeHint) /// /// The location for which resource usage is queried. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllQuotaAsync(AzureLocation location, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMachineLearningQuotasAsync(AzureLocation location, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAllQuota"); + using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningQuotas"); scope.Start(); try { @@ -367,9 +367,9 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAllQuota"); + using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningQuotas"); scope.Start(); try { @@ -392,12 +392,12 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint) /// /// The location for which resource usage is queried. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAllQuota(AzureLocation location, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMachineLearningQuotas(AzureLocation location, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAllQuota"); + using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningQuotas"); scope.Start(); try { @@ -410,9 +410,9 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAllQuota"); + using var scope = QuotasClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetMachineLearningQuotas"); scope.Start(); try { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/BatchDeploymentOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/BatchDeploymentOperationSource.cs deleted file mode 100644 index 8a532dcbf860..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/BatchDeploymentOperationSource.cs +++ /dev/null @@ -1,40 +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; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class BatchDeploymentOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal BatchDeploymentOperationSource(ArmClient client) - { - _client = client; - } - - BatchDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = BatchDeploymentData.DeserializeBatchDeploymentData(document.RootElement); - return new BatchDeploymentResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = BatchDeploymentData.DeserializeBatchDeploymentData(document.RootElement); - return new BatchDeploymentResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/BatchEndpointOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/BatchEndpointOperationSource.cs deleted file mode 100644 index d6629d17bcf7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/BatchEndpointOperationSource.cs +++ /dev/null @@ -1,40 +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; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class BatchEndpointOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal BatchEndpointOperationSource(ArmClient client) - { - _client = client; - } - - BatchEndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = BatchEndpointData.DeserializeBatchEndpointData(document.RootElement); - return new BatchEndpointResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = BatchEndpointData.DeserializeBatchEndpointData(document.RootElement); - return new BatchEndpointResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/DiagnoseResponseResultOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/DiagnoseResponseResultOperationSource.cs deleted file mode 100644 index f28a7c0b792d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/DiagnoseResponseResultOperationSource.cs +++ /dev/null @@ -1,31 +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; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class DiagnoseResponseResultOperationSource : IOperationSource - { - DiagnoseResponseResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return DiagnoseResponseResult.DeserializeDiagnoseResponseResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return DiagnoseResponseResult.DeserializeDiagnoseResponseResult(document.RootElement); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningBatchDeploymentOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningBatchDeploymentOperationSource.cs new file mode 100644 index 000000000000..771aefd19255 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningBatchDeploymentOperationSource.cs @@ -0,0 +1,40 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningBatchDeploymentOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningBatchDeploymentOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningBatchDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningBatchDeploymentData.DeserializeMachineLearningBatchDeploymentData(document.RootElement); + return new MachineLearningBatchDeploymentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningBatchDeploymentData.DeserializeMachineLearningBatchDeploymentData(document.RootElement); + return new MachineLearningBatchDeploymentResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningBatchEndpointOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningBatchEndpointOperationSource.cs new file mode 100644 index 000000000000..673a9241f459 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningBatchEndpointOperationSource.cs @@ -0,0 +1,40 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningBatchEndpointOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningBatchEndpointOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningBatchEndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningBatchEndpointData.DeserializeMachineLearningBatchEndpointData(document.RootElement); + return new MachineLearningBatchEndpointResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningBatchEndpointData.DeserializeMachineLearningBatchEndpointData(document.RootElement); + return new MachineLearningBatchEndpointResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningNotebookResourceInfoOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningNotebookResourceInfoOperationSource.cs new file mode 100644 index 000000000000..a31f0557fb0c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningNotebookResourceInfoOperationSource.cs @@ -0,0 +1,31 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningNotebookResourceInfoOperationSource : IOperationSource + { + MachineLearningNotebookResourceInfo IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return MachineLearningNotebookResourceInfo.DeserializeMachineLearningNotebookResourceInfo(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return MachineLearningNotebookResourceInfo.DeserializeMachineLearningNotebookResourceInfo(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOnlineDeploymentOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOnlineDeploymentOperationSource.cs new file mode 100644 index 000000000000..381e99499415 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOnlineDeploymentOperationSource.cs @@ -0,0 +1,40 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningOnlineDeploymentOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningOnlineDeploymentOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningOnlineDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningOnlineDeploymentData.DeserializeMachineLearningOnlineDeploymentData(document.RootElement); + return new MachineLearningOnlineDeploymentResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningOnlineDeploymentData.DeserializeMachineLearningOnlineDeploymentData(document.RootElement); + return new MachineLearningOnlineDeploymentResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOnlineEndpointOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOnlineEndpointOperationSource.cs new file mode 100644 index 000000000000..01dfd51fb042 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningOnlineEndpointOperationSource.cs @@ -0,0 +1,40 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningOnlineEndpointOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningOnlineEndpointOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningOnlineEndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningOnlineEndpointData.DeserializeMachineLearningOnlineEndpointData(document.RootElement); + return new MachineLearningOnlineEndpointResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningOnlineEndpointData.DeserializeMachineLearningOnlineEndpointData(document.RootElement); + return new MachineLearningOnlineEndpointResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningScheduleOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningScheduleOperationSource.cs new file mode 100644 index 000000000000..cd3284b0873a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningScheduleOperationSource.cs @@ -0,0 +1,40 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningScheduleOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MachineLearningScheduleOperationSource(ArmClient client) + { + _client = client; + } + + MachineLearningScheduleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = MachineLearningScheduleData.DeserializeMachineLearningScheduleData(document.RootElement); + return new MachineLearningScheduleResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = MachineLearningScheduleData.DeserializeMachineLearningScheduleData(document.RootElement); + return new MachineLearningScheduleResource(_client, data); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningWorkspaceDiagnoseResultOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningWorkspaceDiagnoseResultOperationSource.cs new file mode 100644 index 000000000000..4bedcd7c7711 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/MachineLearningWorkspaceDiagnoseResultOperationSource.cs @@ -0,0 +1,31 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + internal class MachineLearningWorkspaceDiagnoseResultOperationSource : IOperationSource + { + MachineLearningWorkspaceDiagnoseResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return MachineLearningWorkspaceDiagnoseResult.DeserializeMachineLearningWorkspaceDiagnoseResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return MachineLearningWorkspaceDiagnoseResult.DeserializeMachineLearningWorkspaceDiagnoseResult(document.RootElement); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/NotebookResourceInfoOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/NotebookResourceInfoOperationSource.cs deleted file mode 100644 index 8817348d2e72..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/NotebookResourceInfoOperationSource.cs +++ /dev/null @@ -1,31 +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; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class NotebookResourceInfoOperationSource : IOperationSource - { - NotebookResourceInfo IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return NotebookResourceInfo.DeserializeNotebookResourceInfo(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return NotebookResourceInfo.DeserializeNotebookResourceInfo(document.RootElement); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/OnlineDeploymentOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/OnlineDeploymentOperationSource.cs deleted file mode 100644 index 46996df9e936..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/OnlineDeploymentOperationSource.cs +++ /dev/null @@ -1,40 +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; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class OnlineDeploymentOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal OnlineDeploymentOperationSource(ArmClient client) - { - _client = client; - } - - OnlineDeploymentResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = OnlineDeploymentData.DeserializeOnlineDeploymentData(document.RootElement); - return new OnlineDeploymentResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = OnlineDeploymentData.DeserializeOnlineDeploymentData(document.RootElement); - return new OnlineDeploymentResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/OnlineEndpointOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/OnlineEndpointOperationSource.cs deleted file mode 100644 index 94281d67200d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/OnlineEndpointOperationSource.cs +++ /dev/null @@ -1,40 +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; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class OnlineEndpointOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal OnlineEndpointOperationSource(ArmClient client) - { - _client = client; - } - - OnlineEndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = OnlineEndpointData.DeserializeOnlineEndpointData(document.RootElement); - return new OnlineEndpointResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = OnlineEndpointData.DeserializeOnlineEndpointData(document.RootElement); - return new OnlineEndpointResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ScheduleOperationSource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ScheduleOperationSource.cs deleted file mode 100644 index 6a7401b07917..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/LongRunningOperation/ScheduleOperationSource.cs +++ /dev/null @@ -1,40 +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; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - internal class ScheduleOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal ScheduleOperationSource(ArmClient client) - { - _client = client; - } - - ScheduleResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = ScheduleData.DeserializeScheduleData(document.RootElement); - return new ScheduleResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = ScheduleData.DeserializeScheduleData(document.RootElement); - return new ScheduleResource(_client, data); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs new file mode 100644 index 000000000000..951194928376 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentCollection.cs @@ -0,0 +1,339 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 GetMachineLearningBatchDeployments method from an instance of . + /// + public partial class MachineLearningBatchDeploymentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics; + private readonly BatchDeploymentsRestOperations _machineLearningBatchDeploymentBatchDeploymentsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningBatchDeploymentCollection() + { + } + + /// 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 MachineLearningBatchDeploymentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningBatchDeploymentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningBatchDeploymentResource.ResourceType, out string machineLearningBatchDeploymentBatchDeploymentsApiVersion); + _machineLearningBatchDeploymentBatchDeploymentsRestClient = new BatchDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningBatchDeploymentBatchDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningBatchEndpointResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningBatchEndpointResource.ResourceType), nameof(id)); + } + + /// + /// Creates/updates a batch inference deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_CreateOrUpdate + /// + /// 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 identifier for the Batch inference deployment. + /// Batch inference deployment definition 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, MachineLearningBatchDeploymentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.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; + } + } + + /// + /// Creates/updates a batch inference deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_CreateOrUpdate + /// + /// 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 identifier for the Batch inference deployment. + /// Batch inference deployment definition 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, MachineLearningBatchDeploymentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.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; + } + } + + /// + /// Gets a batch inference deployment by id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The identifier for the Batch deployments. + /// 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 = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.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 MachineLearningBatchDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a batch inference deployment by id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The identifier for the Batch deployments. + /// 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 = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.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 MachineLearningBatchDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists Batch inference deployments in the workspace. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments + /// Operation Id: BatchDeployments_List + /// + /// Ordering of list. + /// Top of list. + /// 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 GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Lists Batch inference deployments in the workspace. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments + /// Operation Id: BatchDeployments_List + /// + /// Ordering of list. + /// Top of list. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The identifier for the Batch deployments. + /// 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 = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.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}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The identifier for the Batch deployments. + /// 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 = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.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; + } + } + + 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/MachineLearningBatchDeploymentData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.cs new file mode 100644 index 000000000000..79cfcbea27f8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentData.cs @@ -0,0 +1,85 @@ +// 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 MachineLearningBatchDeployment data model. + public partial class MachineLearningBatchDeploymentData : TrackedResourceData + { + /// Initializes a new instance of MachineLearningBatchDeploymentData. + /// The location. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: BatchDeploymentTrackedResource.properties + /// + /// is null. + public MachineLearningBatchDeploymentData(AzureLocation location, MachineLearningBatchDeploymentProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningBatchDeploymentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: BatchDeploymentTrackedResource.identity + /// + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: BatchDeploymentTrackedResource.kind + /// + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: BatchDeploymentTrackedResource.properties + /// + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: BatchDeploymentTrackedResource.sku + /// + internal MachineLearningBatchDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningBatchDeploymentProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + Kind = kind; + Properties = properties; + Sku = sku; + } + + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: BatchDeploymentTrackedResource.identity + /// + public ManagedServiceIdentity Identity { get; set; } + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: BatchDeploymentTrackedResource.kind + /// + public string Kind { get; set; } + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: BatchDeploymentTrackedResource.properties + /// + public MachineLearningBatchDeploymentProperties Properties { get; set; } + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: BatchDeploymentTrackedResource.sku + /// + 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 new file mode 100644 index 000000000000..39364031eb1c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.cs @@ -0,0 +1,513 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningBatchDeployment 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 GetMachineLearningBatchDeploymentResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningBatchDeployment method. + /// + public partial class MachineLearningBatchDeploymentResource : ArmResource + { + /// Generate the resource identifier of a instance. + 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}/batchEndpoints/{endpointName}/deployments/{deploymentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics; + private readonly BatchDeploymentsRestOperations _machineLearningBatchDeploymentBatchDeploymentsRestClient; + private readonly MachineLearningBatchDeploymentData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningBatchDeploymentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningBatchDeploymentResource(ArmClient client, MachineLearningBatchDeploymentData 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 MachineLearningBatchDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningBatchDeploymentBatchDeploymentsApiVersion); + _machineLearningBatchDeploymentBatchDeploymentsRestClient = new BatchDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningBatchDeploymentBatchDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/batchEndpoints/deployments"; + + /// 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 MachineLearningBatchDeploymentData 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 batch inference deployment by id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.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 MachineLearningBatchDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a batch inference deployment by id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.Get"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.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 MachineLearningBatchDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Batch Inference deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Delete + /// + /// 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 = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.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 Batch Inference deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Delete + /// + /// 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 = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.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 a batch inference deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Update + /// + /// 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. + /// Batch inference deployment definition object. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningBatchDeploymentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a batch inference deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Update + /// + /// 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. + /// Batch inference deployment definition object. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningBatchDeploymentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.Update"); + scope.Start(); + try + { + var response = _machineLearningBatchDeploymentBatchDeploymentsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningBatchDeploymentOperationSource(Client), _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics, Pipeline, _machineLearningBatchDeploymentBatchDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningBatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningBatchDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningBatchDeploymentBatchDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningBatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningBatchDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningBatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningBatchDeploymentPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningBatchDeploymentBatchDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningBatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningBatchDeploymentPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningBatchDeploymentBatchDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningBatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningBatchDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningBatchDeploymentBatchDeploymentsClientDiagnostics.CreateScope("MachineLearningBatchDeploymentResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningBatchDeploymentBatchDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningBatchDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningBatchDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs new file mode 100644 index 000000000000..a93f12cb6f63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointCollection.cs @@ -0,0 +1,337 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 GetMachineLearningBatchEndpoints method from an instance of . + /// + public partial class MachineLearningBatchEndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningBatchEndpointBatchEndpointsClientDiagnostics; + private readonly BatchEndpointsRestOperations _machineLearningBatchEndpointBatchEndpointsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningBatchEndpointCollection() + { + } + + /// 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 MachineLearningBatchEndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningBatchEndpointBatchEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningBatchEndpointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningBatchEndpointResource.ResourceType, out string machineLearningBatchEndpointBatchEndpointsApiVersion); + _machineLearningBatchEndpointBatchEndpointsRestClient = new BatchEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningBatchEndpointBatchEndpointsApiVersion); +#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)); + } + + /// + /// Creates a batch inference endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_CreateOrUpdate + /// + /// 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 for the Batch inference endpoint. + /// Batch inference endpoint definition 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, MachineLearningBatchEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.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; + } + } + + /// + /// Creates a batch inference endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_CreateOrUpdate + /// + /// 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 for the Batch inference endpoint. + /// Batch inference endpoint definition 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, MachineLearningBatchEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.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 a batch inference endpoint by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// Name for the Batch Endpoint. + /// 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 = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a batch inference endpoint by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// Name for the Batch Endpoint. + /// 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 = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists Batch inference endpoint in the workspace. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints + /// Operation Id: BatchEndpoints_List + /// + /// Number of endpoints to be retrieved in a page of results. + /// 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 GetAllAsync(int? count = null, string skip = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Lists Batch inference endpoint in the workspace. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints + /// Operation Id: BatchEndpoints_List + /// + /// Number of endpoints to be retrieved in a page of results. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(int? count = null, string skip = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, count, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningBatchEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// Name for the Batch Endpoint. + /// 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 = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.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}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// Name for the Batch Endpoint. + /// 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 = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.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; + } + } + + 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/MachineLearningBatchEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.cs new file mode 100644 index 000000000000..24009dabf4c1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointData.cs @@ -0,0 +1,85 @@ +// 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 MachineLearningBatchEndpoint data model. + public partial class MachineLearningBatchEndpointData : TrackedResourceData + { + /// Initializes a new instance of MachineLearningBatchEndpointData. + /// The location. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: BatchEndpointTrackedResource.properties + /// + /// is null. + public MachineLearningBatchEndpointData(AzureLocation location, MachineLearningBatchEndpointProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningBatchEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: BatchEndpointTrackedResource.identity + /// + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: BatchEndpointTrackedResource.kind + /// + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: BatchEndpointTrackedResource.properties + /// + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: BatchEndpointTrackedResource.sku + /// + internal MachineLearningBatchEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningBatchEndpointProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + Kind = kind; + Properties = properties; + Sku = sku; + } + + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: BatchEndpointTrackedResource.identity + /// + public ManagedServiceIdentity Identity { get; set; } + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: BatchEndpointTrackedResource.kind + /// + public string Kind { get; set; } + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: BatchEndpointTrackedResource.properties + /// + public MachineLearningBatchEndpointProperties Properties { get; set; } + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: BatchEndpointTrackedResource.sku + /// + 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 new file mode 100644 index 000000000000..a166b10a8421 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.cs @@ -0,0 +1,594 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningBatchEndpoint 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 GetMachineLearningBatchEndpointResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningBatchEndpoint method. + /// + public partial class MachineLearningBatchEndpointResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningBatchEndpointBatchEndpointsClientDiagnostics; + private readonly BatchEndpointsRestOperations _machineLearningBatchEndpointBatchEndpointsRestClient; + private readonly MachineLearningBatchEndpointData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningBatchEndpointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningBatchEndpointResource(ArmClient client, MachineLearningBatchEndpointData 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 MachineLearningBatchEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningBatchEndpointBatchEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningBatchEndpointBatchEndpointsApiVersion); + _machineLearningBatchEndpointBatchEndpointsRestClient = new BatchEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningBatchEndpointBatchEndpointsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/batchEndpoints"; + + /// 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 MachineLearningBatchEndpointData 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 MachineLearningBatchDeploymentResources in the MachineLearningBatchEndpoint. + /// An object representing collection of MachineLearningBatchDeploymentResources and their operations over a MachineLearningBatchDeploymentResource. + public virtual MachineLearningBatchDeploymentCollection GetMachineLearningBatchDeployments() + { + return GetCachedClient(Client => new MachineLearningBatchDeploymentCollection(Client, Id)); + } + + /// + /// Gets a batch inference deployment by id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The identifier for the Batch deployments. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningBatchDeploymentAsync(string deploymentName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningBatchDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a batch inference deployment by id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: BatchDeployments_Get + /// + /// The identifier for the Batch deployments. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningBatchDeployment(string deploymentName, CancellationToken cancellationToken = default) + { + return GetMachineLearningBatchDeployments().Get(deploymentName, cancellationToken); + } + + /// + /// Gets a batch inference endpoint by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.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 MachineLearningBatchEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a batch inference endpoint by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.Get"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Batch Inference Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Delete + /// + /// 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 = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Batch Inference Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Delete + /// + /// 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 = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a batch inference endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Update + /// + /// 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. + /// Mutable batch inference endpoint definition object. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a batch inference endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Update + /// + /// 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. + /// Mutable batch inference endpoint definition object. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.Update"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningBatchEndpointOperationSource(Client), _machineLearningBatchEndpointBatchEndpointsClientDiagnostics, Pipeline, _machineLearningBatchEndpointBatchEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists batch Inference Endpoint keys. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys + /// Operation Id: BatchEndpoints_ListKeys + /// + /// The cancellation token to use. + public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.GetKeys"); + scope.Start(); + try + { + var response = await _machineLearningBatchEndpointBatchEndpointsRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists batch Inference Endpoint keys. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys + /// Operation Id: BatchEndpoints_ListKeys + /// + /// The cancellation token to use. + public virtual Response GetKeys(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.GetKeys"); + scope.Start(); + try + { + var response = _machineLearningBatchEndpointBatchEndpointsRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningBatchEndpointBatchEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningBatchEndpointBatchEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningBatchEndpointBatchEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningBatchEndpointBatchEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningBatchEndpointBatchEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName} + /// Operation Id: BatchEndpoints_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningBatchEndpointBatchEndpointsClientDiagnostics.CreateScope("MachineLearningBatchEndpointResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningBatchEndpointBatchEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningBatchEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs new file mode 100644 index 000000000000..78a8fdbe747e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerCollection.cs @@ -0,0 +1,335 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 GetMachineLearningCodeContainers method from an instance of . + /// + public partial class MachineLearningCodeContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningCodeContainerCodeContainersClientDiagnostics; + private readonly CodeContainersRestOperations _machineLearningCodeContainerCodeContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningCodeContainerCollection() + { + } + + /// 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 MachineLearningCodeContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningCodeContainerCodeContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningCodeContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningCodeContainerResource.ResourceType, out string machineLearningCodeContainerCodeContainersApiVersion); + _machineLearningCodeContainerCodeContainersRestClient = new CodeContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningCodeContainerCodeContainersApiVersion); +#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 container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_CreateOrUpdate + /// + /// 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. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// 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 name, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_CreateOrUpdate + /// + /// 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. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// 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 name, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes + /// Operation Id: CodeContainers_List + /// + /// 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 GetAllAsync(string skip = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes + /// Operation Id: CodeContainers_List + /// + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/codes/{name} + /// Operation Id: CodeContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningCodeContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerData.cs new file mode 100644 index 000000000000..f03cf2e4fbce --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningCodeContainer data model. + public partial class MachineLearningCodeContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningCodeContainerData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: CodeContainerResource.properties + /// + /// is null. + public MachineLearningCodeContainerData(MachineLearningCodeContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningCodeContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: CodeContainerResource.properties + /// + internal MachineLearningCodeContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningCodeContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: CodeContainerResource.properties + /// + public MachineLearningCodeContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs new file mode 100644 index 000000000000..7470ce46ad30 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.cs @@ -0,0 +1,286 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningCodeContainer 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 GetMachineLearningCodeContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningCodeContainer method. + /// + public partial class MachineLearningCodeContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningCodeContainerCodeContainersClientDiagnostics; + private readonly CodeContainersRestOperations _machineLearningCodeContainerCodeContainersRestClient; + private readonly MachineLearningCodeContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningCodeContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningCodeContainerResource(ArmClient client, MachineLearningCodeContainerData 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 MachineLearningCodeContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningCodeContainerCodeContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningCodeContainerCodeContainersApiVersion); + _machineLearningCodeContainerCodeContainersRestClient = new CodeContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningCodeContainerCodeContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/codes"; + + /// 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 MachineLearningCodeContainerData 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 MachineLearningCodeVersionResources in the MachineLearningCodeContainer. + /// An object representing collection of MachineLearningCodeVersionResources and their operations over a MachineLearningCodeVersionResource. + public virtual MachineLearningCodeVersionCollection GetMachineLearningCodeVersions() + { + return GetCachedClient(Client => new MachineLearningCodeVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningCodeVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningCodeVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningCodeVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningCodeVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.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 MachineLearningCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningCodeContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Delete + /// + /// 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 = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_Delete + /// + /// 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 = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningCodeContainerCodeContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name} + /// Operation Id: CodeContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeContainerCodeContainersClientDiagnostics.CreateScope("MachineLearningCodeContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningCodeContainerCodeContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeContainerResource(Client, response), response.GetRawResponse())); + 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/MachineLearningCodeVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs new file mode 100644 index 000000000000..78e24c906e09 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionCollection.cs @@ -0,0 +1,339 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 GetMachineLearningCodeVersions method from an instance of . + /// + public partial class MachineLearningCodeVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningCodeVersionCodeVersionsClientDiagnostics; + private readonly CodeVersionsRestOperations _machineLearningCodeVersionCodeVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningCodeVersionCollection() + { + } + + /// 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 MachineLearningCodeVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningCodeVersionCodeVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningCodeVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningCodeVersionResource.ResourceType, out string machineLearningCodeVersionCodeVersionsApiVersion); + _machineLearningCodeVersionCodeVersionsRestClient = new CodeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningCodeVersionCodeVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningCodeContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningCodeContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// 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 version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// 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 version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions + /// Operation Id: CodeVersions_List + /// + /// Ordering of list. + /// Maximum number of records to return. + /// 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 GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions + /// Operation Id: CodeVersions_List + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningCodeVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningCodeVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionData.cs new file mode 100644 index 000000000000..1cbd6903f989 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningCodeVersion data model. + public partial class MachineLearningCodeVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningCodeVersionData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: CodeVersionResource.properties + /// + /// is null. + public MachineLearningCodeVersionData(MachineLearningCodeVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningCodeVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: CodeVersionResource.properties + /// + internal MachineLearningCodeVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningCodeVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: CodeVersionResource.properties + /// + public MachineLearningCodeVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs new file mode 100644 index 000000000000..e1cb0e9320a1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningCodeVersion 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 GetMachineLearningCodeVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningCodeVersion method. + /// + public partial class MachineLearningCodeVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningCodeVersionCodeVersionsClientDiagnostics; + private readonly CodeVersionsRestOperations _machineLearningCodeVersionCodeVersionsRestClient; + private readonly MachineLearningCodeVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningCodeVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningCodeVersionResource(ArmClient client, MachineLearningCodeVersionData 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 MachineLearningCodeVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningCodeVersionCodeVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningCodeVersionCodeVersionsApiVersion); + _machineLearningCodeVersionCodeVersionsRestClient = new CodeVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningCodeVersionCodeVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/codes/versions"; + + /// 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 MachineLearningCodeVersionData 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 version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.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 MachineLearningCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.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 MachineLearningCodeVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Delete + /// + /// 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 = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_Delete + /// + /// 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 = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningCodeVersionCodeVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version} + /// Operation Id: CodeVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningCodeVersionCodeVersionsClientDiagnostics.CreateScope("MachineLearningCodeVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningCodeVersionCodeVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningCodeVersionResource(Client, response), response.GetRawResponse())); + 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/MachineLearningComponentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerCollection.cs new file mode 100644 index 000000000000..3c8708105a93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerCollection.cs @@ -0,0 +1,338 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningComponentContainers method from an instance of . + /// + public partial class MachineLearningComponentContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningComponentContainerComponentContainersClientDiagnostics; + private readonly ComponentContainersRestOperations _machineLearningComponentContainerComponentContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningComponentContainerCollection() + { + } + + /// 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 MachineLearningComponentContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningComponentContainerComponentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningComponentContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningComponentContainerResource.ResourceType, out string machineLearningComponentContainerComponentContainersApiVersion); + _machineLearningComponentContainerComponentContainersRestClient = new ComponentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningComponentContainerComponentContainersApiVersion); +#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 container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_CreateOrUpdate + /// + /// 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. + /// Container name. + /// Container entity to create or update. + /// 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 name, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_CreateOrUpdate + /// + /// 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. + /// Container name. + /// Container entity to create or update. + /// 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 name, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List component containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components + /// Operation Id: ComponentContainers_List + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List component containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components + /// Operation Id: ComponentContainers_List + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/components/{name} + /// Operation Id: ComponentContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningComponentContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerData.cs new file mode 100644 index 000000000000..dde59b17c56e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningComponentContainer data model. + public partial class MachineLearningComponentContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningComponentContainerData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ComponentContainerResource.properties + /// + /// is null. + public MachineLearningComponentContainerData(MachineLearningComponentContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningComponentContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ComponentContainerResource.properties + /// + internal MachineLearningComponentContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningComponentContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ComponentContainerResource.properties + /// + public MachineLearningComponentContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs new file mode 100644 index 000000000000..ad55c61a870e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.cs @@ -0,0 +1,286 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningComponentContainer 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 GetMachineLearningComponentContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningComponentContainer method. + /// + public partial class MachineLearningComponentContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningComponentContainerComponentContainersClientDiagnostics; + private readonly ComponentContainersRestOperations _machineLearningComponentContainerComponentContainersRestClient; + private readonly MachineLearningComponentContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningComponentContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningComponentContainerResource(ArmClient client, MachineLearningComponentContainerData 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 MachineLearningComponentContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningComponentContainerComponentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningComponentContainerComponentContainersApiVersion); + _machineLearningComponentContainerComponentContainersRestClient = new ComponentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningComponentContainerComponentContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/components"; + + /// 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 MachineLearningComponentContainerData 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 MachineLearningComponentVersionResources in the MachineLearningComponentContainer. + /// An object representing collection of MachineLearningComponentVersionResources and their operations over a MachineLearningComponentVersionResource. + public virtual MachineLearningComponentVersionCollection GetMachineLearningComponentVersions() + { + return GetCachedClient(Client => new MachineLearningComponentVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningComponentVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningComponentVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningComponentVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningComponentVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.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 MachineLearningComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningComponentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Delete + /// + /// 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 = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_Delete + /// + /// 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 = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningComponentContainerComponentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name} + /// Operation Id: ComponentContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentContainerComponentContainersClientDiagnostics.CreateScope("MachineLearningComponentContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningComponentContainerComponentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentContainerResource(Client, response), response.GetRawResponse())); + 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/MachineLearningComponentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs new file mode 100644 index 000000000000..73a10ddb2505 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionCollection.cs @@ -0,0 +1,342 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningComponentVersions method from an instance of . + /// + public partial class MachineLearningComponentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningComponentVersionComponentVersionsClientDiagnostics; + private readonly ComponentVersionsRestOperations _machineLearningComponentVersionComponentVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningComponentVersionCollection() + { + } + + /// 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 MachineLearningComponentVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningComponentVersionComponentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningComponentVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningComponentVersionResource.ResourceType, out string machineLearningComponentVersionComponentVersionsApiVersion); + _machineLearningComponentVersionComponentVersionsRestClient = new ComponentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningComponentVersionComponentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningComponentContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningComponentContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. + /// Version entity to create or update. + /// 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 version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. + /// Version entity to create or update. + /// 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 version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List component versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions + /// Operation Id: ComponentVersions_List + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List component versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions + /// Operation Id: ComponentVersions_List + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningComponentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningComponentVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionData.cs new file mode 100644 index 000000000000..b970284d0c93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningComponentVersion data model. + public partial class MachineLearningComponentVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningComponentVersionData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ComponentVersionResource.properties + /// + /// is null. + public MachineLearningComponentVersionData(MachineLearningComponentVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningComponentVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ComponentVersionResource.properties + /// + internal MachineLearningComponentVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningComponentVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ComponentVersionResource.properties + /// + public MachineLearningComponentVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs new file mode 100644 index 000000000000..7ad2e842c92f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningComponentVersion 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 GetMachineLearningComponentVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningComponentVersion method. + /// + public partial class MachineLearningComponentVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningComponentVersionComponentVersionsClientDiagnostics; + private readonly ComponentVersionsRestOperations _machineLearningComponentVersionComponentVersionsRestClient; + private readonly MachineLearningComponentVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningComponentVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningComponentVersionResource(ArmClient client, MachineLearningComponentVersionData 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 MachineLearningComponentVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningComponentVersionComponentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningComponentVersionComponentVersionsApiVersion); + _machineLearningComponentVersionComponentVersionsRestClient = new ComponentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningComponentVersionComponentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/components/versions"; + + /// 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 MachineLearningComponentVersionData 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 version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.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 MachineLearningComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.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 MachineLearningComponentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Delete + /// + /// 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 = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_Delete + /// + /// 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 = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningComponentVersionComponentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version} + /// Operation Id: ComponentVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningComponentVersionComponentVersionsClientDiagnostics.CreateScope("MachineLearningComponentVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningComponentVersionComponentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningComponentVersionResource(Client, response), response.GetRawResponse())); + 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/MachineLearningComputeData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeData.cs index 46600d68d925..080e1985cfba 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeData.cs @@ -28,29 +28,43 @@ public MachineLearningComputeData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The identity of the resource. - /// The sku of the workspace. + /// + /// The identity of the resource. + /// Serialized Name: ComputeResource.identity + /// + /// + /// The sku of the workspace. + /// Serialized Name: ComputeResource.sku + /// /// /// 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 . + /// Serialized Name: ComputeResourceSchema.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 . /// - internal MachineLearningComputeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, Compute properties) : base(id, name, resourceType, systemData, tags, location) + internal MachineLearningComputeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, MachineLearningComputeProperties properties) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; Properties = properties; } - /// The identity of the resource. + /// + /// The identity of the resource. + /// Serialized Name: ComputeResource.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// + /// The sku of the workspace. + /// Serialized Name: ComputeResource.sku + /// public MachineLearningSku Sku { get; set; } /// /// 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 . + /// Serialized Name: ComputeResourceSchema.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 Compute Properties { get; set; } + public MachineLearningComputeProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs index 72c4cd258e99..49ec494fc081 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.cs @@ -143,7 +143,7 @@ public virtual Response Get(CancellationToken ca /// 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. /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public virtual async Task DeleteAsync(WaitUntil waitUntil, MachineLearningUnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.Delete"); scope.Start(); @@ -170,7 +170,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Underly /// 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. /// Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'. /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public virtual ArmOperation Delete(WaitUntil waitUntil, MachineLearningUnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.Delete"); scope.Start(); @@ -339,7 +339,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// Operation Id: Compute_ListKeys /// /// The cancellation token to use. - public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) { using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.GetKeys"); scope.Start(); @@ -361,7 +361,7 @@ public virtual async Task> GetKeysAsync(CancellationTok /// Operation Id: Compute_ListKeys /// /// The cancellation token to use. - public virtual Response GetKeys(CancellationToken cancellationToken = default) + public virtual Response GetKeys(CancellationToken cancellationToken = default) { using var scope = _machineLearningComputeComputeClientDiagnostics.CreateScope("MachineLearningComputeResource.GetKeys"); scope.Start(); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs new file mode 100644 index 000000000000..f6d879512bb6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerCollection.cs @@ -0,0 +1,338 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningDataContainers method from an instance of . + /// + public partial class MachineLearningDataContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningDataContainerDataContainersClientDiagnostics; + private readonly DataContainersRestOperations _machineLearningDataContainerDataContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningDataContainerCollection() + { + } + + /// 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 MachineLearningDataContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningDataContainerDataContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningDataContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningDataContainerResource.ResourceType, out string machineLearningDataContainerDataContainersApiVersion); + _machineLearningDataContainerDataContainersRestClient = new DataContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningDataContainerDataContainersApiVersion); +#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 container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_CreateOrUpdate + /// + /// 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. + /// Container name. + /// Container entity to create or update. + /// 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 name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_CreateOrUpdate + /// + /// 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. + /// Container name. + /// Container entity to create or update. + /// 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 name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List data containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data + /// Operation Id: DataContainers_List + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List data containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data + /// Operation Id: DataContainers_List + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/data/{name} + /// Operation Id: DataContainers_Get + /// + /// Container name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningDataContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerData.cs new file mode 100644 index 000000000000..6958567008f7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningDataContainer data model. + public partial class MachineLearningDataContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningDataContainerData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DataContainerResource.properties + /// + /// is null. + public MachineLearningDataContainerData(MachineLearningDataContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningDataContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DataContainerResource.properties + /// + internal MachineLearningDataContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningDataContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DataContainerResource.properties + /// + public MachineLearningDataContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs new file mode 100644 index 000000000000..62eaee731739 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.cs @@ -0,0 +1,286 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningDataContainer 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 GetMachineLearningDataContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningDataContainer method. + /// + public partial class MachineLearningDataContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningDataContainerDataContainersClientDiagnostics; + private readonly DataContainersRestOperations _machineLearningDataContainerDataContainersRestClient; + private readonly MachineLearningDataContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningDataContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningDataContainerResource(ArmClient client, MachineLearningDataContainerData 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 MachineLearningDataContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningDataContainerDataContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningDataContainerDataContainersApiVersion); + _machineLearningDataContainerDataContainersRestClient = new DataContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningDataContainerDataContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/data"; + + /// 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 MachineLearningDataContainerData 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 MachineLearningDataVersionResources in the MachineLearningDataContainer. + /// An object representing collection of MachineLearningDataVersionResources and their operations over a MachineLearningDataVersionResource. + public virtual MachineLearningDataVersionCollection GetMachineLearningDataVersions() + { + return GetCachedClient(Client => new MachineLearningDataVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningDataVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningDataVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningDataVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningDataVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.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 MachineLearningDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDataContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Delete + /// + /// 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 = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_Delete + /// + /// 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 = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningDataContainerDataContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name} + /// Operation Id: DataContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataContainerDataContainersClientDiagnostics.CreateScope("MachineLearningDataContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningDataContainerDataContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataContainerResource(Client, response), response.GetRawResponse())); + 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/MachineLearningDataVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs new file mode 100644 index 000000000000..aeddf6604e59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionCollection.cs @@ -0,0 +1,350 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningDataVersions method from an instance of . + /// + public partial class MachineLearningDataVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningDataVersionDataVersionsClientDiagnostics; + private readonly DataVersionsRestOperations _machineLearningDataVersionDataVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningDataVersionCollection() + { + } + + /// 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 MachineLearningDataVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningDataVersionDataVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningDataVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningDataVersionResource.ResourceType, out string machineLearningDataVersionDataVersionsApiVersion); + _machineLearningDataVersionDataVersionsRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningDataVersionDataVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningDataContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningDataContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. + /// Version entity to create or update. + /// 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 version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. + /// Version entity to create or update. + /// 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 version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List data versions in the data container + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions + /// Operation Id: DataVersions_List + /// + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List data versions in the data container + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions + /// Operation Id: DataVersions_List + /// + /// Please choose OrderBy value from ['createdtime', 'modifiedtime']. + /// + /// Top count of results, top count cannot be greater than the page size. + /// If topCount > page size, results with be default page size count will be returned + /// + /// Continuation token for pagination. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, tags, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDataVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// Version identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningDataVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionData.cs new file mode 100644 index 000000000000..e013101688f1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionData.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningDataVersion data model. + public partial class MachineLearningDataVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningDataVersionData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DataVersionBaseResource.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 . + /// + /// is null. + public MachineLearningDataVersionData(MachineLearningDataVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningDataVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DataVersionBaseResource.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 . + /// + internal MachineLearningDataVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningDataVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DataVersionBaseResource.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 MachineLearningDataVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs new file mode 100644 index 000000000000..8201ff95cdfe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningDataVersion 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 GetMachineLearningDataVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningDataVersion method. + /// + public partial class MachineLearningDataVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningDataVersionDataVersionsClientDiagnostics; + private readonly DataVersionsRestOperations _machineLearningDataVersionDataVersionsRestClient; + private readonly MachineLearningDataVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningDataVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningDataVersionResource(ArmClient client, MachineLearningDataVersionData 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 MachineLearningDataVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningDataVersionDataVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningDataVersionDataVersionsApiVersion); + _machineLearningDataVersionDataVersionsRestClient = new DataVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningDataVersionDataVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/data/versions"; + + /// 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 MachineLearningDataVersionData 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 version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.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 MachineLearningDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.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 MachineLearningDataVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Delete + /// + /// 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 = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_Delete + /// + /// 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 = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningDataVersionDataVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version} + /// Operation Id: DataVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDataVersionDataVersionsClientDiagnostics.CreateScope("MachineLearningDataVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningDataVersionDataVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDataVersionResource(Client, response), response.GetRawResponse())); + 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/MachineLearningDatastoreCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreCollection.cs new file mode 100644 index 000000000000..28fbabeab27c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreCollection.cs @@ -0,0 +1,349 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 GetMachineLearningDatastores method from an instance of . + /// + public partial class MachineLearningDatastoreCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningDatastoreDatastoresClientDiagnostics; + private readonly DatastoresRestOperations _machineLearningDatastoreDatastoresRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningDatastoreCollection() + { + } + + /// 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 MachineLearningDatastoreCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningDatastoreDatastoresClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningDatastoreResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningDatastoreResource.ResourceType, out string machineLearningDatastoreDatastoresApiVersion); + _machineLearningDatastoreDatastoresRestClient = new DatastoresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningDatastoreDatastoresApiVersion); +#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 datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_CreateOrUpdate + /// + /// 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. + /// Datastore name. + /// Datastore entity to create or update. + /// Flag to skip validation. + /// 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 name, MachineLearningDatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, skipValidation, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDatastoreResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_CreateOrUpdate + /// + /// 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. + /// Datastore name. + /// Datastore entity to create or update. + /// Flag to skip validation. + /// 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 name, MachineLearningDatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, skipValidation, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDatastoreResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Get + /// + /// Datastore name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDatastoreResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Get + /// + /// Datastore name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDatastoreResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List datastores. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores + /// Operation Id: Datastores_List + /// + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List datastores. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores + /// Operation Id: Datastores_List + /// + /// Continuation token for pagination. + /// Maximum number of results to return. + /// Filter down to the workspace default datastore. + /// Names of datastores to return. + /// Text to search for in the datastore names. + /// Order by property (createdtime | modifiedtime | name). + /// Order by property in ascending order. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, int? count = null, bool? isDefault = null, IEnumerable names = null, string searchText = null, string orderBy = null, bool? orderByAsc = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, isDefault, names, searchText, orderBy, orderByAsc, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningDatastoreResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Get + /// + /// Datastore name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/datastores/{name} + /// Operation Id: Datastores_Get + /// + /// Datastore name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningDatastoreData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreData.cs new file mode 100644 index 000000000000..63bbd17b0028 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreData.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningDatastore data model. + public partial class MachineLearningDatastoreData : ResourceData + { + /// Initializes a new instance of MachineLearningDatastoreData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DatastoreResource.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 . + /// + /// is null. + public MachineLearningDatastoreData(MachineLearningDatastoreProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningDatastoreData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DatastoreResource.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 . + /// + internal MachineLearningDatastoreData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningDatastoreProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: DatastoreResource.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 MachineLearningDatastoreProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs new file mode 100644 index 000000000000..90f7180d6e1f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.cs @@ -0,0 +1,296 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningDatastoreDatastoresClientDiagnostics; + private readonly DatastoresRestOperations _machineLearningDatastoreDatastoresRestClient; + private readonly MachineLearningDatastoreData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningDatastoreResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningDatastoreResource(ArmClient client, MachineLearningDatastoreData 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 MachineLearningDatastoreResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningDatastoreDatastoresClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningDatastoreDatastoresApiVersion); + _machineLearningDatastoreDatastoresRestClient = new DatastoresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningDatastoreDatastoresApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/datastores"; + + /// 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 MachineLearningDatastoreData 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 datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.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 MachineLearningDatastoreResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.Get"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningDatastoreResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Delete + /// + /// 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 = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_Delete + /// + /// 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 = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_CreateOrUpdate + /// + /// 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. + /// Datastore entity to create or update. + /// Flag to skip validation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningDatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningDatastoreDatastoresRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, skipValidation, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDatastoreResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update datastore. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name} + /// Operation Id: Datastores_CreateOrUpdate + /// + /// 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. + /// Datastore entity to create or update. + /// Flag to skip validation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningDatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningDatastoreDatastoresClientDiagnostics.CreateScope("MachineLearningDatastoreResource.Update"); + scope.Start(); + try + { + var response = _machineLearningDatastoreDatastoresRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, skipValidation, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningDatastoreResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get datastore secrets. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets + /// Operation Id: Datastores_ListSecrets + /// + /// The cancellation token to use. + 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, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get datastore secrets. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets + /// Operation Id: Datastores_ListSecrets + /// + /// The cancellation token to use. + 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, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs new file mode 100644 index 000000000000..fb40b88ea4a1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerCollection.cs @@ -0,0 +1,338 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningEnvironmentContainers method from an instance of . + /// + public partial class MachineLearningEnvironmentContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics; + private readonly EnvironmentContainersRestOperations _machineLearningEnvironmentContainerEnvironmentContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningEnvironmentContainerCollection() + { + } + + /// 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 MachineLearningEnvironmentContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningEnvironmentContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningEnvironmentContainerResource.ResourceType, out string machineLearningEnvironmentContainerEnvironmentContainersApiVersion); + _machineLearningEnvironmentContainerEnvironmentContainersRestClient = new EnvironmentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningEnvironmentContainerEnvironmentContainersApiVersion); +#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 container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_CreateOrUpdate + /// + /// 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. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// 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 name, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_CreateOrUpdate + /// + /// 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. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// 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 name, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List environment containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments + /// Operation Id: EnvironmentContainers_List + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List environment containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments + /// Operation Id: EnvironmentContainers_List + /// + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/environments/{name} + /// Operation Id: EnvironmentContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningEnvironmentContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerData.cs new file mode 100644 index 000000000000..d01f6ee4244e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningEnvironmentContainer data model. + public partial class MachineLearningEnvironmentContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningEnvironmentContainerData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: EnvironmentContainerResource.properties + /// + /// is null. + public MachineLearningEnvironmentContainerData(MachineLearningEnvironmentContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningEnvironmentContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: EnvironmentContainerResource.properties + /// + internal MachineLearningEnvironmentContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningEnvironmentContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: EnvironmentContainerResource.properties + /// + public MachineLearningEnvironmentContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs new file mode 100644 index 000000000000..11ddc0acbf7e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.cs @@ -0,0 +1,286 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningEnvironmentContainer 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 GetMachineLearningEnvironmentContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningEnvironmentContainer method. + /// + public partial class MachineLearningEnvironmentContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics; + private readonly EnvironmentContainersRestOperations _machineLearningEnvironmentContainerEnvironmentContainersRestClient; + private readonly MachineLearningEnvironmentContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningEnvironmentContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningEnvironmentContainerResource(ArmClient client, MachineLearningEnvironmentContainerData 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 MachineLearningEnvironmentContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningEnvironmentContainerEnvironmentContainersApiVersion); + _machineLearningEnvironmentContainerEnvironmentContainersRestClient = new EnvironmentContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningEnvironmentContainerEnvironmentContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/environments"; + + /// 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 MachineLearningEnvironmentContainerData 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 MachineLearningEnvironmentVersionResources in the MachineLearningEnvironmentContainer. + /// An object representing collection of MachineLearningEnvironmentVersionResources and their operations over a MachineLearningEnvironmentVersionResource. + public virtual MachineLearningEnvironmentVersionCollection GetMachineLearningEnvironmentVersions() + { + return GetCachedClient(Client => new MachineLearningEnvironmentVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningEnvironmentVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningEnvironmentVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningEnvironmentVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningEnvironmentVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.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 MachineLearningEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Delete + /// + /// 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 = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_Delete + /// + /// 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 = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentContainerEnvironmentContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name} + /// Operation Id: EnvironmentContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentContainerEnvironmentContainersClientDiagnostics.CreateScope("MachineLearningEnvironmentContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentContainerEnvironmentContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentContainerResource(Client, response), response.GetRawResponse())); + 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/MachineLearningEnvironmentVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs new file mode 100644 index 000000000000..a279d5540c3c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionCollection.cs @@ -0,0 +1,342 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningEnvironmentVersions method from an instance of . + /// + public partial class MachineLearningEnvironmentVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics; + private readonly EnvironmentVersionsRestOperations _machineLearningEnvironmentVersionEnvironmentVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningEnvironmentVersionCollection() + { + } + + /// 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 MachineLearningEnvironmentVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningEnvironmentVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningEnvironmentVersionResource.ResourceType, out string machineLearningEnvironmentVersionEnvironmentVersionsApiVersion); + _machineLearningEnvironmentVersionEnvironmentVersionsRestClient = new EnvironmentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningEnvironmentVersionEnvironmentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningEnvironmentContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningEnvironmentContainerResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates an EnvironmentVersion. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_CreateOrUpdate + /// + /// 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. + /// Version of EnvironmentVersion. + /// Definition of EnvironmentVersion. + /// 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 version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an EnvironmentVersion. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_CreateOrUpdate + /// + /// 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. + /// Version of EnvironmentVersion. + /// Definition of EnvironmentVersion. + /// 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 version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions + /// Operation Id: EnvironmentVersions_List + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions + /// Operation Id: EnvironmentVersions_List + /// + /// Ordering of list. + /// Maximum number of records to return. + /// Continuation token for pagination. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningEnvironmentVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningEnvironmentVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionData.cs new file mode 100644 index 000000000000..3161dd6eafd1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningEnvironmentVersion data model. + public partial class MachineLearningEnvironmentVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningEnvironmentVersionData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: EnvironmentVersionResource.properties + /// + /// is null. + public MachineLearningEnvironmentVersionData(MachineLearningEnvironmentVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningEnvironmentVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: EnvironmentVersionResource.properties + /// + internal MachineLearningEnvironmentVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningEnvironmentVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: EnvironmentVersionResource.properties + /// + public MachineLearningEnvironmentVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs new file mode 100644 index 000000000000..8c3a76c6a7f4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningEnvironmentVersion 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 GetMachineLearningEnvironmentVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningEnvironmentVersion method. + /// + public partial class MachineLearningEnvironmentVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics; + private readonly EnvironmentVersionsRestOperations _machineLearningEnvironmentVersionEnvironmentVersionsRestClient; + private readonly MachineLearningEnvironmentVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningEnvironmentVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningEnvironmentVersionResource(ArmClient client, MachineLearningEnvironmentVersionData 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 MachineLearningEnvironmentVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningEnvironmentVersionEnvironmentVersionsApiVersion); + _machineLearningEnvironmentVersionEnvironmentVersionsRestClient = new EnvironmentVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningEnvironmentVersionEnvironmentVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/environments/versions"; + + /// 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 MachineLearningEnvironmentVersionData 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 version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.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 MachineLearningEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.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 MachineLearningEnvironmentVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Delete + /// + /// 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 = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_Delete + /// + /// 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 = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an EnvironmentVersion. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_CreateOrUpdate + /// + /// 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. + /// Definition of EnvironmentVersion. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an EnvironmentVersion. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version} + /// Operation Id: EnvironmentVersions_CreateOrUpdate + /// + /// 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. + /// Definition of EnvironmentVersion. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningEnvironmentVersionEnvironmentVersionsClientDiagnostics.CreateScope("MachineLearningEnvironmentVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningEnvironmentVersionEnvironmentVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningEnvironmentVersionResource(Client, response), response.GetRawResponse())); + 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/MachineLearningJobCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs index 66adffdaeed8..7611ce6bb9e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobCollection.cs @@ -189,7 +189,7 @@ public virtual Response Get(string id, CancellationT /// View type for including/excluding (for example) archived entities. /// The cancellation token to use. /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, string jobType = null, string tag = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable GetAllAsync(string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { @@ -235,7 +235,7 @@ async Task> NextPageFunc(string nextLink, int? /// View type for including/excluding (for example) archived entities. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, string jobType = null, string tag = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs index 097fc44afc2c..a1de355b700e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobData.cs @@ -18,8 +18,9 @@ public partial class MachineLearningJobData : ResourceData /// Initializes a new instance of MachineLearningJobData. /// /// [Required] Additional attributes of the entity. + /// Serialized Name: JobBaseResource.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 . + /// The available derived classes include , , and . /// /// is null. public MachineLearningJobData(MachineLearningJobProperties properties) @@ -36,8 +37,9 @@ public MachineLearningJobData(MachineLearningJobProperties properties) /// The systemData. /// /// [Required] Additional attributes of the entity. + /// Serialized Name: JobBaseResource.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 . + /// The available derived classes include , , and . /// internal MachineLearningJobData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningJobProperties properties) : base(id, name, resourceType, systemData) { @@ -46,8 +48,9 @@ internal MachineLearningJobData(ResourceIdentifier id, string name, ResourceType /// /// [Required] Additional attributes of the entity. + /// Serialized Name: JobBaseResource.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 . + /// The available derived classes include , , and . /// public MachineLearningJobProperties Properties { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs new file mode 100644 index 000000000000..1e24af8ee0ea --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerCollection.cs @@ -0,0 +1,340 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningModelContainers method from an instance of . + /// + public partial class MachineLearningModelContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningModelContainerModelContainersClientDiagnostics; + private readonly ModelContainersRestOperations _machineLearningModelContainerModelContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningModelContainerCollection() + { + } + + /// 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 MachineLearningModelContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningModelContainerModelContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningModelContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningModelContainerResource.ResourceType, out string machineLearningModelContainerModelContainersApiVersion); + _machineLearningModelContainerModelContainersRestClient = new ModelContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningModelContainerModelContainersApiVersion); +#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 container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_CreateOrUpdate + /// + /// 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. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// 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 name, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_CreateOrUpdate + /// + /// 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. + /// Container name. This is case-sensitive. + /// Container entity to create or update. + /// 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 name, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List model containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models + /// Operation Id: ModelContainers_List + /// + /// Continuation token for pagination. + /// Maximum number of results to return. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, int? count = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List model containers. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models + /// Operation Id: ModelContainers_List + /// + /// Continuation token for pagination. + /// Maximum number of results to return. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, int? count = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/models/{name} + /// Operation Id: ModelContainers_Get + /// + /// Container name. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningModelContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerData.cs new file mode 100644 index 000000000000..88a0e8d62809 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningModelContainer data model. + public partial class MachineLearningModelContainerData : ResourceData + { + /// Initializes a new instance of MachineLearningModelContainerData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ModelContainerResource.properties + /// + /// is null. + public MachineLearningModelContainerData(MachineLearningModelContainerProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningModelContainerData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ModelContainerResource.properties + /// + internal MachineLearningModelContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningModelContainerProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ModelContainerResource.properties + /// + public MachineLearningModelContainerProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs new file mode 100644 index 000000000000..5c8aa1357fd7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.cs @@ -0,0 +1,286 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningModelContainer 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 GetMachineLearningModelContainerResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningModelContainer method. + /// + public partial class MachineLearningModelContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningModelContainerModelContainersClientDiagnostics; + private readonly ModelContainersRestOperations _machineLearningModelContainerModelContainersRestClient; + private readonly MachineLearningModelContainerData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningModelContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningModelContainerResource(ArmClient client, MachineLearningModelContainerData 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 MachineLearningModelContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningModelContainerModelContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningModelContainerModelContainersApiVersion); + _machineLearningModelContainerModelContainersRestClient = new ModelContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningModelContainerModelContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/models"; + + /// 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 MachineLearningModelContainerData 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 MachineLearningModelVersionResources in the MachineLearningModelContainer. + /// An object representing collection of MachineLearningModelVersionResources and their operations over a MachineLearningModelVersionResource. + public virtual MachineLearningModelVersionCollection GetMachineLearningModelVersions() + { + return GetCachedClient(Client => new MachineLearningModelVersionCollection(Client, Id)); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningModelVersionAsync(string version, CancellationToken cancellationToken = default) + { + return await GetMachineLearningModelVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningModelVersion(string version, CancellationToken cancellationToken = default) + { + return GetMachineLearningModelVersions().Get(version, cancellationToken); + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.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 MachineLearningModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerResource.Get"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningModelContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Delete + /// + /// 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 = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_Delete + /// + /// 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 = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningModelContainerModelContainersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelContainerResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update container. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} + /// Operation Id: ModelContainers_CreateOrUpdate + /// + /// 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. + /// Container entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelContainerModelContainersClientDiagnostics.CreateScope("MachineLearningModelContainerResource.Update"); + scope.Start(); + try + { + var response = _machineLearningModelContainerModelContainersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelContainerResource(Client, response), response.GetRawResponse())); + 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/MachineLearningModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs new file mode 100644 index 000000000000..63062804599e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionCollection.cs @@ -0,0 +1,354 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningModelVersions method from an instance of . + /// + public partial class MachineLearningModelVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningModelVersionModelVersionsClientDiagnostics; + private readonly ModelVersionsRestOperations _machineLearningModelVersionModelVersionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningModelVersionCollection() + { + } + + /// 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 MachineLearningModelVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningModelVersionModelVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningModelVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningModelVersionResource.ResourceType, out string machineLearningModelVersionModelVersionsApiVersion); + _machineLearningModelVersionModelVersionsRestClient = new ModelVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningModelVersionModelVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningModelContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningModelContainerResource.ResourceType), nameof(id)); + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// 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 version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_CreateOrUpdate + /// + /// 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. + /// Version identifier. This is case-sensitive. + /// Version entity to create or update. + /// 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 version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List model versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions + /// Operation Id: ModelVersions_List + /// + /// Continuation token for pagination. + /// Ordering of list. + /// Maximum number of records to return. + /// Model version. + /// Model description. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Name of the feed. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List model versions. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions + /// Operation Id: ModelVersions_List + /// + /// Continuation token for pagination. + /// Ordering of list. + /// Maximum number of records to return. + /// Model version. + /// Model description. + /// Number of initial results to skip. + /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. + /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. + /// Name of the feed. + /// View type for including/excluding (for example) archived entities. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// Version identifier. This is case-sensitive. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningModelVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionData.cs new file mode 100644 index 000000000000..78c502b52738 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningModelVersion data model. + public partial class MachineLearningModelVersionData : ResourceData + { + /// Initializes a new instance of MachineLearningModelVersionData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ModelVersionResource.properties + /// + /// is null. + public MachineLearningModelVersionData(MachineLearningModelVersionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningModelVersionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ModelVersionResource.properties + /// + internal MachineLearningModelVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningModelVersionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: ModelVersionResource.properties + /// + public MachineLearningModelVersionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs new file mode 100644 index 000000000000..ff49e9fb28c5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningModelVersion 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 GetMachineLearningModelVersionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningModelVersion method. + /// + public partial class MachineLearningModelVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningModelVersionModelVersionsClientDiagnostics; + private readonly ModelVersionsRestOperations _machineLearningModelVersionModelVersionsRestClient; + private readonly MachineLearningModelVersionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningModelVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningModelVersionResource(ArmClient client, MachineLearningModelVersionData 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 MachineLearningModelVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningModelVersionModelVersionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningModelVersionModelVersionsApiVersion); + _machineLearningModelVersionModelVersionsRestClient = new ModelVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningModelVersionModelVersionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/models/versions"; + + /// 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 MachineLearningModelVersionData 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 version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.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 MachineLearningModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.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 MachineLearningModelVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Delete + /// + /// 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 = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_Delete + /// + /// 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 = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningModelVersionModelVersionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelVersionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update version. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} + /// Operation Id: ModelVersions_CreateOrUpdate + /// + /// 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. + /// Version entity to create or update. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningModelVersionModelVersionsClientDiagnostics.CreateScope("MachineLearningModelVersionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningModelVersionModelVersionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningModelVersionResource(Client, response), response.GetRawResponse())); + 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/MachineLearningOnlineDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs new file mode 100644 index 000000000000..b1fd033748bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentCollection.cs @@ -0,0 +1,339 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 GetMachineLearningOnlineDeployments method from an instance of . + /// + public partial class MachineLearningOnlineDeploymentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics; + private readonly OnlineDeploymentsRestOperations _machineLearningOnlineDeploymentOnlineDeploymentsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningOnlineDeploymentCollection() + { + } + + /// 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 MachineLearningOnlineDeploymentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningOnlineDeploymentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningOnlineDeploymentResource.ResourceType, out string machineLearningOnlineDeploymentOnlineDeploymentsApiVersion); + _machineLearningOnlineDeploymentOnlineDeploymentsRestClient = new OnlineDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningOnlineDeploymentOnlineDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != MachineLearningOnlineEndpointResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, MachineLearningOnlineEndpointResource.ResourceType), nameof(id)); + } + + /// + /// Create or update Inference Endpoint Deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_CreateOrUpdate + /// + /// 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. + /// Inference Endpoint Deployment name. + /// Inference Endpoint entity to apply during operation. + /// 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, MachineLearningOnlineDeploymentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 Inference Endpoint Deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_CreateOrUpdate + /// + /// 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. + /// Inference Endpoint Deployment name. + /// Inference Endpoint entity to apply during operation. + /// 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, MachineLearningOnlineDeploymentData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 Inference Deployment Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// Inference Endpoint Deployment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 MachineLearningOnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Inference Deployment Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// Inference Endpoint Deployment name. + /// 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 = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 MachineLearningOnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Inference Endpoint Deployments. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments + /// Operation Id: OnlineDeployments_List + /// + /// Ordering of list. + /// Top of list. + /// 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 GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List Inference Endpoint Deployments. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments + /// Operation Id: OnlineDeployments_List + /// + /// Ordering of list. + /// Top of list. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// Inference Endpoint Deployment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string deploymentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// Inference Endpoint Deployment name. + /// 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 = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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; + } + } + + 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/MachineLearningOnlineDeploymentData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.cs new file mode 100644 index 000000000000..1f855f7dc5ac --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentData.cs @@ -0,0 +1,91 @@ +// 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 MachineLearningOnlineDeployment data model. + public partial class MachineLearningOnlineDeploymentData : TrackedResourceData + { + /// Initializes a new instance of MachineLearningOnlineDeploymentData. + /// The location. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: OnlineDeploymentTrackedResource.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 . + /// + /// is null. + public MachineLearningOnlineDeploymentData(AzureLocation location, MachineLearningOnlineDeploymentProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningOnlineDeploymentData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: OnlineDeploymentTrackedResource.identity + /// + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: OnlineDeploymentTrackedResource.kind + /// + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: OnlineDeploymentTrackedResource.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 . + /// + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: OnlineDeploymentTrackedResource.sku + /// + internal MachineLearningOnlineDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningOnlineDeploymentProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + Kind = kind; + Properties = properties; + Sku = sku; + } + + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: OnlineDeploymentTrackedResource.identity + /// + public ManagedServiceIdentity Identity { get; set; } + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: OnlineDeploymentTrackedResource.kind + /// + public string Kind { get; set; } + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: OnlineDeploymentTrackedResource.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 MachineLearningOnlineDeploymentProperties Properties { get; set; } + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: OnlineDeploymentTrackedResource.sku + /// + 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 new file mode 100644 index 000000000000..33acd432e227 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.cs @@ -0,0 +1,653 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningOnlineDeployment 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 GetMachineLearningOnlineDeploymentResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningOnlineDeployment method. + /// + public partial class MachineLearningOnlineDeploymentResource : ArmResource + { + /// Generate the resource identifier of a instance. + 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}/onlineEndpoints/{endpointName}/deployments/{deploymentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics; + private readonly OnlineDeploymentsRestOperations _machineLearningOnlineDeploymentOnlineDeploymentsRestClient; + private readonly MachineLearningOnlineDeploymentData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningOnlineDeploymentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningOnlineDeploymentResource(ArmClient client, MachineLearningOnlineDeploymentData 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 MachineLearningOnlineDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningOnlineDeploymentOnlineDeploymentsApiVersion); + _machineLearningOnlineDeploymentOnlineDeploymentsRestClient = new OnlineDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningOnlineDeploymentOnlineDeploymentsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments"; + + /// 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 MachineLearningOnlineDeploymentData 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 Inference Deployment Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 MachineLearningOnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Inference Deployment Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.Get"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 MachineLearningOnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Inference Endpoint Deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Delete + /// + /// 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 = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 Inference Endpoint Deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Delete + /// + /// 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 = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.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 Online Deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Update + /// + /// 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. + /// Online Endpoint entity to apply during operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningOnlineDeploymentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Online Deployment (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Update + /// + /// 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. + /// Online Endpoint entity to apply during operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningOnlineDeploymentPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.Update"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineDeploymentOperationSource(Client), _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics, Pipeline, _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Polls an Endpoint operation. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs + /// Operation Id: OnlineDeployments_GetLogs + /// + /// The request containing parameters for retrieving logs. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetLogsAsync(MachineLearningDeploymentLogsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.GetLogs"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.GetLogsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Polls an Endpoint operation. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs + /// Operation Id: OnlineDeployments_GetLogs + /// + /// The request containing parameters for retrieving logs. + /// The cancellation token to use. + /// is null. + public virtual Response GetLogs(MachineLearningDeploymentLogsContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.GetLogs"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.GetLogs(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Inference Endpoint Deployment Skus. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus + /// Operation Id: OnlineDeployments_ListSkus + /// + /// Number of Skus to be retrieved in a page of results. + /// 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 GetSkusAsync(int? count = null, string skip = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.GetSkus"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListSkusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.GetSkus"); + scope.Start(); + try + { + var response = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListSkusNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List Inference Endpoint Deployment Skus. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus + /// Operation Id: OnlineDeployments_ListSkus + /// + /// Number of Skus to be retrieved in a page of results. + /// Continuation token for pagination. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSkus(int? count = null, string skip = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.GetSkus"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListSkus(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.GetSkus"); + scope.Start(); + try + { + var response = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.ListSkusNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningOnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningOnlineDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningOnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningOnlineDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningOnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningOnlineDeploymentPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningOnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningOnlineDeploymentPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningOnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningOnlineDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningOnlineDeploymentOnlineDeploymentsClientDiagnostics.CreateScope("MachineLearningOnlineDeploymentResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningOnlineDeploymentOnlineDeploymentsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningOnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningOnlineDeploymentPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs new file mode 100644 index 000000000000..78c5deebe928 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointCollection.cs @@ -0,0 +1,348 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningOnlineEndpoints method from an instance of . + /// + public partial class MachineLearningOnlineEndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics; + private readonly OnlineEndpointsRestOperations _machineLearningOnlineEndpointOnlineEndpointsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningOnlineEndpointCollection() + { + } + + /// 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 MachineLearningOnlineEndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningOnlineEndpointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningOnlineEndpointResource.ResourceType, out string machineLearningOnlineEndpointOnlineEndpointsApiVersion); + _machineLearningOnlineEndpointOnlineEndpointsRestClient = new OnlineEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningOnlineEndpointOnlineEndpointsApiVersion); +#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 Online Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_CreateOrUpdate + /// + /// 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. + /// Online Endpoint name. + /// Online Endpoint entity to apply during operation. + /// 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, MachineLearningOnlineEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.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 Online Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_CreateOrUpdate + /// + /// 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. + /// Online Endpoint name. + /// Online Endpoint entity to apply during operation. + /// 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, MachineLearningOnlineEndpointData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.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; + } + } + + /// + /// Get Online Endpoint. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// Online Endpoint name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Online Endpoint. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// Online Endpoint name. + /// 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 = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Online Endpoints. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints + /// Operation Id: OnlineEndpoints_List + /// + /// Name of the endpoint. + /// Number of endpoints to be retrieved in a page of results. + /// EndpointComputeType to be filtered by. + /// Continuation token for pagination. + /// A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + /// A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + /// The option to order the response. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string name = null, int? count = null, MachineLearningEndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, MachineLearningOrderString? orderBy = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List Online Endpoints. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints + /// Operation Id: OnlineEndpoints_List + /// + /// Name of the endpoint. + /// Number of endpoints to be retrieved in a page of results. + /// EndpointComputeType to be filtered by. + /// Continuation token for pagination. + /// A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . + /// A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . + /// The option to order the response. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string name = null, int? count = null, MachineLearningEndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, MachineLearningOrderString? orderBy = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningOnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// Online Endpoint name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string endpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.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}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// Online Endpoint name. + /// 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 = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.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; + } + } + + 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/MachineLearningOnlineEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.cs new file mode 100644 index 000000000000..455b006ff0e4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointData.cs @@ -0,0 +1,85 @@ +// 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 MachineLearningOnlineEndpoint data model. + public partial class MachineLearningOnlineEndpointData : TrackedResourceData + { + /// Initializes a new instance of MachineLearningOnlineEndpointData. + /// The location. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: OnlineEndpointTrackedResource.properties + /// + /// is null. + public MachineLearningOnlineEndpointData(AzureLocation location, MachineLearningOnlineEndpointProperties properties) : base(location) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningOnlineEndpointData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: OnlineEndpointTrackedResource.identity + /// + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: OnlineEndpointTrackedResource.kind + /// + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: OnlineEndpointTrackedResource.properties + /// + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: OnlineEndpointTrackedResource.sku + /// + internal MachineLearningOnlineEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, MachineLearningOnlineEndpointProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + Kind = kind; + Properties = properties; + Sku = sku; + } + + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: OnlineEndpointTrackedResource.identity + /// + public ManagedServiceIdentity Identity { get; set; } + /// + /// Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type. + /// Serialized Name: OnlineEndpointTrackedResource.kind + /// + public string Kind { get; set; } + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: OnlineEndpointTrackedResource.properties + /// + public MachineLearningOnlineEndpointProperties Properties { get; set; } + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: OnlineEndpointTrackedResource.sku + /// + 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 new file mode 100644 index 000000000000..a77dfceb499a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.cs @@ -0,0 +1,698 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.MachineLearning.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningOnlineEndpoint 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 GetMachineLearningOnlineEndpointResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningOnlineEndpoint method. + /// + public partial class MachineLearningOnlineEndpointResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics; + private readonly OnlineEndpointsRestOperations _machineLearningOnlineEndpointOnlineEndpointsRestClient; + private readonly MachineLearningOnlineEndpointData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningOnlineEndpointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningOnlineEndpointResource(ArmClient client, MachineLearningOnlineEndpointData 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 MachineLearningOnlineEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningOnlineEndpointOnlineEndpointsApiVersion); + _machineLearningOnlineEndpointOnlineEndpointsRestClient = new OnlineEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningOnlineEndpointOnlineEndpointsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/onlineEndpoints"; + + /// 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 MachineLearningOnlineEndpointData 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 MachineLearningOnlineDeploymentResources in the MachineLearningOnlineEndpoint. + /// An object representing collection of MachineLearningOnlineDeploymentResources and their operations over a MachineLearningOnlineDeploymentResource. + public virtual MachineLearningOnlineDeploymentCollection GetMachineLearningOnlineDeployments() + { + return GetCachedClient(Client => new MachineLearningOnlineDeploymentCollection(Client, Id)); + } + + /// + /// Get Inference Deployment Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// Inference Endpoint Deployment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetMachineLearningOnlineDeploymentAsync(string deploymentName, CancellationToken cancellationToken = default) + { + return await GetMachineLearningOnlineDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get Inference Deployment Deployment. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} + /// Operation Id: OnlineDeployments_Get + /// + /// Inference Endpoint Deployment name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetMachineLearningOnlineDeployment(string deploymentName, CancellationToken cancellationToken = default) + { + return GetMachineLearningOnlineDeployments().Get(deploymentName, cancellationToken); + } + + /// + /// Get Online Endpoint. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.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 MachineLearningOnlineEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get Online Endpoint. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.Get"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Online Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Delete + /// + /// 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 = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete Online Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Delete + /// + /// 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 = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Online Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Update + /// + /// 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. + /// Online Endpoint entity to apply during operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update Online Endpoint (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Update + /// + /// 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. + /// Online Endpoint entity to apply during operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.Update"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningOnlineEndpointOperationSource(Client), _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List EndpointAuthKeys for an Endpoint using Key-based authentication. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys + /// Operation Id: OnlineEndpoints_ListKeys + /// + /// The cancellation token to use. + public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.GetKeys"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List EndpointAuthKeys for an Endpoint using Key-based authentication. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys + /// Operation Id: OnlineEndpoints_ListKeys + /// + /// The cancellation token to use. + public virtual Response GetKeys(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.GetKeys"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys + /// Operation Id: OnlineEndpoints_RegenerateKeys + /// + /// 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. + /// RegenerateKeys request . + /// The cancellation token to use. + /// is null. + public virtual async Task RegenerateKeysAsync(WaitUntil waitUntil, MachineLearningEndpointKeyRegenerateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.RegenerateKeys"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.RegenerateKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateRegenerateKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys + /// Operation Id: OnlineEndpoints_RegenerateKeys + /// + /// 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. + /// RegenerateKeys request . + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RegenerateKeys(WaitUntil waitUntil, MachineLearningEndpointKeyRegenerateContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.RegenerateKeys"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.RegenerateKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics, Pipeline, _machineLearningOnlineEndpointOnlineEndpointsRestClient.CreateRegenerateKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token + /// Operation Id: OnlineEndpoints_GetToken + /// + /// The cancellation token to use. + public virtual async Task> GetTokenAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.GetToken"); + scope.Start(); + try + { + var response = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.GetTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token + /// Operation Id: OnlineEndpoints_GetToken + /// + /// The cancellation token to use. + public virtual Response GetToken(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.GetToken"); + scope.Start(); + try + { + var response = _machineLearningOnlineEndpointOnlineEndpointsRestClient.GetToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _machineLearningOnlineEndpointOnlineEndpointsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} + /// Operation Id: OnlineEndpoints_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _machineLearningOnlineEndpointOnlineEndpointsClientDiagnostics.CreateScope("MachineLearningOnlineEndpointResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _machineLearningOnlineEndpointOnlineEndpointsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new MachineLearningOnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MachineLearningResourcePatchWithIdentity(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs index a3c093fb1374..695ccb4bfc0b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionData.cs @@ -28,12 +28,27 @@ public MachineLearningPrivateEndpointConnectionData(AzureLocation location) : ba /// The systemData. /// The tags. /// The location. - /// 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. - internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, PrivateEndpoint privateEndpoint, MachineLearningPrivateLinkServiceConnectionState connectionState, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) + /// + /// The identity of the resource. + /// Serialized Name: PrivateEndpointConnection.identity + /// + /// + /// The sku of the workspace. + /// Serialized Name: PrivateEndpointConnection.sku + /// + /// + /// The resource of private end point. + /// Serialized Name: PrivateEndpointConnection.properties.privateEndpoint + /// + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// Serialized Name: PrivateEndpointConnection.properties.privateLinkServiceConnectionState + /// + /// + /// The provisioning state of the private endpoint connection resource. + /// Serialized Name: PrivateEndpointConnection.properties.provisioningState + /// + internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, MachineLearningPrivateEndpoint privateEndpoint, MachineLearningPrivateLinkServiceConnectionState connectionState, MachineLearningPrivateEndpointConnectionProvisioningState? provisioningState) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; @@ -42,15 +57,30 @@ internal MachineLearningPrivateEndpointConnectionData(ResourceIdentifier id, str ProvisioningState = provisioningState; } - /// The identity of the resource. + /// + /// The identity of the resource. + /// Serialized Name: PrivateEndpointConnection.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// + /// The sku of the workspace. + /// Serialized Name: PrivateEndpointConnection.sku + /// public MachineLearningSku Sku { get; set; } - /// The resource of private end point. - public PrivateEndpoint PrivateEndpoint { get; set; } - /// A collection of information about the state of the connection between service consumer and provider. + /// + /// The resource of private end point. + /// Serialized Name: PrivateEndpointConnection.properties.privateEndpoint + /// + public MachineLearningPrivateEndpoint PrivateEndpoint { get; set; } + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// Serialized Name: PrivateEndpointConnection.properties.privateLinkServiceConnectionState + /// public MachineLearningPrivateLinkServiceConnectionState ConnectionState { get; set; } - /// The provisioning state of the private endpoint connection resource. + /// + /// The provisioning state of the private endpoint connection resource. + /// Serialized Name: PrivateEndpointConnection.properties.provisioningState + /// public MachineLearningPrivateEndpointConnectionProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs new file mode 100644 index 000000000000..78ddad9b50fd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleCollection.cs @@ -0,0 +1,338 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +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 a instance call the GetMachineLearningSchedules method from an instance of . + /// + public partial class MachineLearningScheduleCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _machineLearningScheduleSchedulesClientDiagnostics; + private readonly SchedulesRestOperations _machineLearningScheduleSchedulesRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningScheduleCollection() + { + } + + /// 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 MachineLearningScheduleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningScheduleSchedulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningScheduleResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningScheduleResource.ResourceType, out string machineLearningScheduleSchedulesApiVersion); + _machineLearningScheduleSchedulesRestClient = new SchedulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningScheduleSchedulesApiVersion); +#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 schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_CreateOrUpdate + /// + /// 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. + /// Schedule name. + /// Schedule definition. + /// 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 name, MachineLearningScheduleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, 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 schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_CreateOrUpdate + /// + /// 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. + /// Schedule name. + /// Schedule definition. + /// 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 name, MachineLearningScheduleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Get + /// + /// Schedule name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningScheduleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Get + /// + /// Schedule name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningScheduleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List schedules in specified workspace. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules + /// Operation Id: Schedules_List + /// + /// Continuation token for pagination. + /// Status filter for schedule. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(string skip = null, MachineLearningScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// List schedules in specified workspace. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules + /// Operation Id: Schedules_List + /// + /// Continuation token for pagination. + /// Status filter for schedule. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(string skip = null, MachineLearningScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Get + /// + /// Schedule name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/schedules/{name} + /// Operation Id: Schedules_Get + /// + /// Schedule name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningScheduleData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleData.cs new file mode 100644 index 000000000000..8c0b7baec9e2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleData.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningSchedule data model. + public partial class MachineLearningScheduleData : ResourceData + { + /// Initializes a new instance of MachineLearningScheduleData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: Schedule.properties + /// + /// is null. + public MachineLearningScheduleData(MachineLearningScheduleProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningScheduleData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: Schedule.properties + /// + internal MachineLearningScheduleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningScheduleProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// [Required] Additional attributes of the entity. + /// Serialized Name: Schedule.properties + /// + public MachineLearningScheduleProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs new file mode 100644 index 000000000000..35513cdffda8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.cs @@ -0,0 +1,249 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningSchedule 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 GetMachineLearningScheduleResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningSchedule method. + /// + public partial class MachineLearningScheduleResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningScheduleSchedulesClientDiagnostics; + private readonly SchedulesRestOperations _machineLearningScheduleSchedulesRestClient; + private readonly MachineLearningScheduleData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningScheduleResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningScheduleResource(ArmClient client, MachineLearningScheduleData 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 MachineLearningScheduleResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningScheduleSchedulesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningScheduleSchedulesApiVersion); + _machineLearningScheduleSchedulesRestClient = new SchedulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningScheduleSchedulesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/schedules"; + + /// 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 MachineLearningScheduleData 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 schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.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 MachineLearningScheduleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleResource.Get"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningScheduleResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Delete + /// + /// 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 = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(_machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_Delete + /// + /// 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 = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(_machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or update schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_CreateOrUpdate + /// + /// 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. + /// Schedule definition. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningScheduleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningScheduleSchedulesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.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 schedule. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} + /// Operation Id: Schedules_CreateOrUpdate + /// + /// 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. + /// Schedule definition. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningScheduleData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningScheduleSchedulesClientDiagnostics.CreateScope("MachineLearningScheduleResource.Update"); + scope.Start(); + try + { + var response = _machineLearningScheduleSchedulesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(new MachineLearningScheduleOperationSource(Client), _machineLearningScheduleSchedulesClientDiagnostics, Pipeline, _machineLearningScheduleSchedulesRestClient.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; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs new file mode 100644 index 000000000000..3539a67905eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionCollection.cs @@ -0,0 +1,331 @@ +// 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.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +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 + { + private readonly ClientDiagnostics _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics; + private readonly WorkspaceConnectionsRestOperations _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningWorkspaceConnectionCollection() + { + } + + /// 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 MachineLearningWorkspaceConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", MachineLearningWorkspaceConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MachineLearningWorkspaceConnectionResource.ResourceType, out string machineLearningWorkspaceConnectionWorkspaceConnectionsApiVersion); + _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient = new WorkspaceConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningWorkspaceConnectionWorkspaceConnectionsApiVersion); +#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)); + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_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. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// 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 connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_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. + /// Friendly name of the workspace connection. + /// The object for creating or updating a new workspace connection. + /// 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 connectionName, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Get + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string connectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Get + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string connectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.Get"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections + /// Operation Id: WorkspaceConnections_List + /// + /// 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 = null, string category = null, CancellationToken cancellationToken = default) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningWorkspaceConnectionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.GetAll"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningWorkspaceConnectionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections + /// Operation Id: WorkspaceConnections_List + /// + /// 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 = null, string category = null, CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningWorkspaceConnectionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.GetAll"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new MachineLearningWorkspaceConnectionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Get + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string connectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, 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} + /// Operation Id: WorkspaceConnections_Get + /// + /// Friendly name of the workspace connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string connectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, 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/MachineLearningWorkspaceConnectionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionData.cs new file mode 100644 index 000000000000..28bafa76d2e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionData.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + /// A class representing the MachineLearningWorkspaceConnection data model. + public partial class MachineLearningWorkspaceConnectionData : ResourceData + { + /// Initializes a new instance of MachineLearningWorkspaceConnectionData. + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResource.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 . + /// + /// is null. + public MachineLearningWorkspaceConnectionData(MachineLearningWorkspaceConnectionProperties properties) + { + Argument.AssertNotNull(properties, nameof(properties)); + + Properties = properties; + } + + /// Initializes a new instance of MachineLearningWorkspaceConnectionData. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResource.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 . + /// + internal MachineLearningWorkspaceConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineLearningWorkspaceConnectionProperties properties) : base(id, name, resourceType, systemData) + { + Properties = properties; + } + + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResource.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 MachineLearningWorkspaceConnectionProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs new file mode 100644 index 000000000000..7156c61e7640 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.cs @@ -0,0 +1,243 @@ +// 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; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning +{ + /// + /// A Class representing a MachineLearningWorkspaceConnection 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 GetMachineLearningWorkspaceConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetMachineLearningWorkspaceConnection method. + /// + public partial class MachineLearningWorkspaceConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics; + private readonly WorkspaceConnectionsRestOperations _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient; + private readonly MachineLearningWorkspaceConnectionData _data; + + /// Initializes a new instance of the class for mocking. + protected MachineLearningWorkspaceConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MachineLearningWorkspaceConnectionResource(ArmClient client, MachineLearningWorkspaceConnectionData 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 MachineLearningWorkspaceConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string machineLearningWorkspaceConnectionWorkspaceConnectionsApiVersion); + _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient = new WorkspaceConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineLearningWorkspaceConnectionWorkspaceConnectionsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/connections"; + + /// 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 MachineLearningWorkspaceConnectionData 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)); + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Get"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.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 MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Get"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Delete + /// + /// 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 = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_Delete + /// + /// 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 = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Delete"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new MachineLearningArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_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. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); + scope.Start(); + try + { + var response = await _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} + /// Operation Id: WorkspaceConnections_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. + /// The object for creating or updating a new workspace connection. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MachineLearningWorkspaceConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _machineLearningWorkspaceConnectionWorkspaceConnectionsClientDiagnostics.CreateScope("MachineLearningWorkspaceConnectionResource.Update"); + scope.Start(); + try + { + var response = _machineLearningWorkspaceConnectionWorkspaceConnectionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new MachineLearningArmOperation(Response.FromValue(new MachineLearningWorkspaceConnectionResource(Client, response), response.GetRawResponse())); + 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/MachineLearningWorkspaceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs index 5f7b03bf8f47..f3ec93511f5b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceData.cs @@ -21,7 +21,7 @@ public partial class MachineLearningWorkspaceData : TrackedResourceData public MachineLearningWorkspaceData(AzureLocation location) : base(location) { PrivateEndpointConnections = new ChangeTrackingList(); - SharedPrivateLinkResources = new ChangeTrackingList(); + SharedPrivateLinkResources = new ChangeTrackingList(); } /// Initializes a new instance of MachineLearningWorkspaceData. @@ -31,34 +31,115 @@ public MachineLearningWorkspaceData(AzureLocation location) : base(location) /// 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. - /// 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. - internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, string workspaceId, string description, string friendlyName, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, Uri discoveryUri, ProvisioningState? provisioningState, EncryptionProperty encryption, bool? hbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, PublicNetworkAccess? publicNetworkAccess, IReadOnlyList privateEndpointConnections, IList sharedPrivateLinkResources, NotebookResourceInfo notebookInfo, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, Guid? tenantId, bool? storageHnsEnabled, Uri mlFlowTrackingUri, bool? v1LegacyMode) : base(id, name, resourceType, systemData, tags, location) + /// + /// The identity of the resource. + /// Serialized Name: Workspace.identity + /// + /// + /// The sku of the workspace. + /// Serialized Name: Workspace.sku + /// + /// + /// The immutable id associated with this workspace. + /// Serialized Name: Workspace.properties.workspaceId + /// + /// + /// The description of this workspace. + /// Serialized Name: Workspace.properties.description + /// + /// + /// The friendly name for this workspace. This name in mutable + /// Serialized Name: Workspace.properties.friendlyName + /// + /// + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created + /// Serialized Name: Workspace.properties.keyVault + /// + /// + /// ARM id of the application insights associated with this workspace. + /// Serialized Name: Workspace.properties.applicationInsights + /// + /// + /// ARM id of the container registry associated with this workspace. + /// Serialized Name: Workspace.properties.containerRegistry + /// + /// + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created + /// Serialized Name: Workspace.properties.storageAccount + /// + /// + /// Url for the discovery service to identify regional endpoints for machine learning experimentation services + /// Serialized Name: Workspace.properties.discoveryUrl + /// + /// + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// Serialized Name: Workspace.properties.provisioningState + /// + /// + /// The encryption settings of Azure ML workspace. + /// Serialized Name: Workspace.properties.encryption + /// + /// + /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + /// Serialized Name: Workspace.properties.hbiWorkspace + /// + /// + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace + /// Serialized Name: Workspace.properties.serviceProvisionedResourceGroup + /// + /// + /// Count of private connections in the workspace + /// Serialized Name: Workspace.properties.privateLinkCount + /// + /// + /// The compute name for image build + /// Serialized Name: Workspace.properties.imageBuildCompute + /// + /// + /// The flag to indicate whether to allow public access when behind VNet. + /// Serialized Name: Workspace.properties.allowPublicAccessWhenBehindVnet + /// + /// + /// Whether requests from Public Network are allowed. + /// Serialized Name: Workspace.properties.publicNetworkAccess + /// + /// + /// The list of private endpoint connections in the workspace. + /// Serialized Name: Workspace.properties.privateEndpointConnections + /// + /// + /// The list of shared private link resources in this workspace. + /// Serialized Name: Workspace.properties.sharedPrivateLinkResources + /// + /// + /// The notebook info of Azure ML workspace. + /// Serialized Name: Workspace.properties.notebookInfo + /// + /// + /// The service managed resource settings. + /// Serialized Name: Workspace.properties.serviceManagedResourcesSettings + /// + /// + /// The user assigned identity resource id that represents the workspace identity. + /// Serialized Name: Workspace.properties.primaryUserAssignedIdentity + /// + /// + /// The tenant id associated with this workspace. + /// Serialized Name: Workspace.properties.tenantId + /// + /// + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + /// Serialized Name: Workspace.properties.storageHnsEnabled + /// + /// + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + /// Serialized Name: Workspace.properties.mlFlowTrackingUri + /// + /// + /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + /// Serialized Name: Workspace.properties.v1LegacyMode + /// + internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, string workspaceId, string description, string friendlyName, string keyVault, string applicationInsights, string containerRegistry, string storageAccount, Uri discoveryUri, MachineLearningProvisioningState? provisioningState, MachineLearningEncryptionSetting encryption, bool? hbiWorkspace, string serviceProvisionedResourceGroup, int? privateLinkCount, string imageBuildCompute, bool? allowPublicAccessWhenBehindVnet, MachineLearningPublicNetworkAccess? publicNetworkAccess, IReadOnlyList privateEndpointConnections, IList sharedPrivateLinkResources, MachineLearningNotebookResourceInfo notebookInfo, ServiceManagedResourcesSettings serviceManagedResourcesSettings, string primaryUserAssignedIdentity, Guid? tenantId, bool? isStorageHnsEnabled, Uri mlFlowTrackingUri, bool? isV1LegacyMode) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; @@ -84,56 +165,125 @@ internal MachineLearningWorkspaceData(ResourceIdentifier id, string name, Resour ServiceManagedResourcesSettings = serviceManagedResourcesSettings; PrimaryUserAssignedIdentity = primaryUserAssignedIdentity; TenantId = tenantId; - StorageHnsEnabled = storageHnsEnabled; + IsStorageHnsEnabled = isStorageHnsEnabled; MlFlowTrackingUri = mlFlowTrackingUri; - V1LegacyMode = v1LegacyMode; + IsV1LegacyMode = isV1LegacyMode; } - /// The identity of the resource. + /// + /// The identity of the resource. + /// Serialized Name: Workspace.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// + /// The sku of the workspace. + /// Serialized Name: Workspace.sku + /// public MachineLearningSku Sku { get; set; } - /// The immutable id associated with this workspace. + /// + /// The immutable id associated with this workspace. + /// Serialized Name: Workspace.properties.workspaceId + /// public string WorkspaceId { get; } - /// The description of this workspace. + /// + /// The description of this workspace. + /// Serialized Name: Workspace.properties.description + /// public string Description { get; set; } - /// The friendly name for this workspace. This name in mutable. + /// + /// The friendly name for this workspace. This name in mutable + /// Serialized Name: Workspace.properties.friendlyName + /// 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. + /// + /// ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created + /// Serialized Name: Workspace.properties.keyVault + /// public string KeyVault { get; set; } - /// ARM id of the application insights associated with this workspace. + /// + /// ARM id of the application insights associated with this workspace. + /// Serialized Name: Workspace.properties.applicationInsights + /// public string ApplicationInsights { get; set; } - /// ARM id of the container registry associated with this workspace. + /// + /// ARM id of the container registry associated with this workspace. + /// Serialized Name: Workspace.properties.containerRegistry + /// public string ContainerRegistry { get; set; } - /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created. + /// + /// ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created + /// Serialized Name: Workspace.properties.storageAccount + /// public string StorageAccount { get; set; } - /// Url for the discovery service to identify regional endpoints for machine learning experimentation services. + /// + /// Url for the discovery service to identify regional endpoints for machine learning experimentation services + /// Serialized Name: Workspace.properties.discoveryUrl + /// public Uri DiscoveryUri { get; set; } - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - public ProvisioningState? ProvisioningState { get; } - /// The encryption settings of Azure ML workspace. - public EncryptionProperty Encryption { get; set; } - /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service. + /// + /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// Serialized Name: Workspace.properties.provisioningState + /// + public MachineLearningProvisioningState? ProvisioningState { get; } + /// + /// The encryption settings of Azure ML workspace. + /// Serialized Name: Workspace.properties.encryption + /// + public MachineLearningEncryptionSetting Encryption { get; set; } + /// + /// The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service + /// Serialized Name: Workspace.properties.hbiWorkspace + /// public bool? HbiWorkspace { get; set; } - /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace. + /// + /// The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace + /// Serialized Name: Workspace.properties.serviceProvisionedResourceGroup + /// public string ServiceProvisionedResourceGroup { get; } - /// Count of private connections in the workspace. + /// + /// Count of private connections in the workspace + /// Serialized Name: Workspace.properties.privateLinkCount + /// public int? PrivateLinkCount { get; } - /// The compute name for image build. + /// + /// The compute name for image build + /// Serialized Name: Workspace.properties.imageBuildCompute + /// public string ImageBuildCompute { get; set; } - /// The flag to indicate whether to allow public access when behind VNet. + /// + /// The flag to indicate whether to allow public access when behind VNet. + /// Serialized Name: Workspace.properties.allowPublicAccessWhenBehindVnet + /// public bool? AllowPublicAccessWhenBehindVnet { get; set; } - /// Whether requests from Public Network are allowed. - public PublicNetworkAccess? PublicNetworkAccess { get; set; } - /// The list of private endpoint connections in the workspace. + /// + /// Whether requests from Public Network are allowed. + /// Serialized Name: Workspace.properties.publicNetworkAccess + /// + public MachineLearningPublicNetworkAccess? PublicNetworkAccess { get; set; } + /// + /// The list of private endpoint connections in the workspace. + /// Serialized Name: Workspace.properties.privateEndpointConnections + /// public IReadOnlyList PrivateEndpointConnections { get; } - /// The list of shared private link resources in this workspace. - public IList SharedPrivateLinkResources { get; } - /// The notebook info of Azure ML workspace. - public NotebookResourceInfo NotebookInfo { get; } - /// The service managed resource settings. + /// + /// The list of shared private link resources in this workspace. + /// Serialized Name: Workspace.properties.sharedPrivateLinkResources + /// + public IList SharedPrivateLinkResources { get; } + /// + /// The notebook info of Azure ML workspace. + /// Serialized Name: Workspace.properties.notebookInfo + /// + public MachineLearningNotebookResourceInfo NotebookInfo { get; } + /// + /// The service managed resource settings. + /// Serialized Name: Workspace.properties.serviceManagedResourcesSettings + /// internal ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } - /// The throughput of the collections in cosmosdb database. + /// + /// The throughput of the collections in cosmosdb database + /// Serialized Name: CosmosDbSettings.collectionsThroughput + /// public int? CosmosDbCollectionsThroughput { get => ServiceManagedResourcesSettings is null ? default : ServiceManagedResourcesSettings.CosmosDbCollectionsThroughput; @@ -145,15 +295,30 @@ public int? CosmosDbCollectionsThroughput } } - /// The user assigned identity resource id that represents the workspace identity. + /// + /// The user assigned identity resource id that represents the workspace identity. + /// Serialized Name: Workspace.properties.primaryUserAssignedIdentity + /// public string PrimaryUserAssignedIdentity { get; set; } - /// The tenant id associated with this workspace. + /// + /// The tenant id associated with this workspace. + /// Serialized Name: Workspace.properties.tenantId + /// public Guid? TenantId { get; } - /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. - public bool? StorageHnsEnabled { get; } - /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + /// + /// If the storage associated with the workspace has hierarchical namespace(HNS) enabled. + /// Serialized Name: Workspace.properties.storageHnsEnabled + /// + public bool? IsStorageHnsEnabled { get; } + /// + /// The URI associated with this workspace that machine learning flow must point at to set up tracking. + /// Serialized Name: Workspace.properties.mlFlowTrackingUri + /// public Uri MlFlowTrackingUri { get; } - /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - public bool? V1LegacyMode { get; set; } + /// + /// Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. + /// Serialized Name: Workspace.properties.v1LegacyMode + /// + public bool? IsV1LegacyMode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs index 297a4859d387..ef30c09a7eb5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.cs @@ -171,11 +171,11 @@ public virtual Response GetMac return GetMachineLearningPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); } - /// Gets a collection of WorkspaceConnectionPropertiesV2BasicResources in the MachineLearningWorkspace. - /// An object representing collection of WorkspaceConnectionPropertiesV2BasicResources and their operations over a WorkspaceConnectionPropertiesV2BasicResource. - public virtual WorkspaceConnectionPropertiesV2BasicResourceCollection GetWorkspaceConnectionPropertiesV2BasicResources() + /// 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 WorkspaceConnectionPropertiesV2BasicResourceCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningWorkspaceConnectionCollection(Client, Id)); } /// @@ -187,9 +187,9 @@ public virtual WorkspaceConnectionPropertiesV2BasicResourceCollection GetWorkspa /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetWorkspaceConnectionPropertiesV2BasicResourceAsync(string connectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningWorkspaceConnectionAsync(string connectionName, CancellationToken cancellationToken = default) { - return await GetWorkspaceConnectionPropertiesV2BasicResources().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningWorkspaceConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); } /// @@ -201,16 +201,16 @@ public virtual async Task /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetWorkspaceConnectionPropertiesV2BasicResource(string connectionName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningWorkspaceConnection(string connectionName, CancellationToken cancellationToken = default) { - return GetWorkspaceConnectionPropertiesV2BasicResources().Get(connectionName, cancellationToken); + return GetMachineLearningWorkspaceConnections().Get(connectionName, cancellationToken); } - /// Gets a collection of BatchEndpointResources in the MachineLearningWorkspace. - /// An object representing collection of BatchEndpointResources and their operations over a BatchEndpointResource. - public virtual BatchEndpointCollection GetBatchEndpoints() + /// 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 BatchEndpointCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningBatchEndpointCollection(Client, Id)); } /// @@ -223,9 +223,9 @@ public virtual BatchEndpointCollection GetBatchEndpoints() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetBatchEndpointAsync(string endpointName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningBatchEndpointAsync(string endpointName, CancellationToken cancellationToken = default) { - return await GetBatchEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningBatchEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); } /// @@ -238,16 +238,16 @@ public virtual async Task> GetBatchEndpointAsync /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetBatchEndpoint(string endpointName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningBatchEndpoint(string endpointName, CancellationToken cancellationToken = default) { - return GetBatchEndpoints().Get(endpointName, cancellationToken); + return GetMachineLearningBatchEndpoints().Get(endpointName, cancellationToken); } - /// Gets a collection of CodeContainerResources in the MachineLearningWorkspace. - /// An object representing collection of CodeContainerResources and their operations over a CodeContainerResource. - public virtual CodeContainerCollection GetCodeContainers() + /// Gets a collection of MachineLearningCodeContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningCodeContainerResources and their operations over a MachineLearningCodeContainerResource. + public virtual MachineLearningCodeContainerCollection GetMachineLearningCodeContainers() { - return GetCachedClient(Client => new CodeContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningCodeContainerCollection(Client, Id)); } /// @@ -260,9 +260,9 @@ public virtual CodeContainerCollection GetCodeContainers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetCodeContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningCodeContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetCodeContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningCodeContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -275,16 +275,16 @@ public virtual async Task> GetCodeContainerAsync /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetCodeContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningCodeContainer(string name, CancellationToken cancellationToken = default) { - return GetCodeContainers().Get(name, cancellationToken); + return GetMachineLearningCodeContainers().Get(name, cancellationToken); } - /// Gets a collection of ComponentContainerResources in the MachineLearningWorkspace. - /// An object representing collection of ComponentContainerResources and their operations over a ComponentContainerResource. - public virtual ComponentContainerCollection GetComponentContainers() + /// Gets a collection of MachineLearningComponentContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningComponentContainerResources and their operations over a MachineLearningComponentContainerResource. + public virtual MachineLearningComponentContainerCollection GetMachineLearningComponentContainers() { - return GetCachedClient(Client => new ComponentContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningComponentContainerCollection(Client, Id)); } /// @@ -297,9 +297,9 @@ public virtual ComponentContainerCollection GetComponentContainers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetComponentContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningComponentContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetComponentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningComponentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -312,16 +312,16 @@ public virtual async Task> GetComponentCont /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetComponentContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningComponentContainer(string name, CancellationToken cancellationToken = default) { - return GetComponentContainers().Get(name, cancellationToken); + return GetMachineLearningComponentContainers().Get(name, cancellationToken); } - /// Gets a collection of DataContainerResources in the MachineLearningWorkspace. - /// An object representing collection of DataContainerResources and their operations over a DataContainerResource. - public virtual DataContainerCollection GetDataContainers() + /// Gets a collection of MachineLearningDataContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningDataContainerResources and their operations over a MachineLearningDataContainerResource. + public virtual MachineLearningDataContainerCollection GetMachineLearningDataContainers() { - return GetCachedClient(Client => new DataContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningDataContainerCollection(Client, Id)); } /// @@ -334,9 +334,9 @@ public virtual DataContainerCollection GetDataContainers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDataContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningDataContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetDataContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningDataContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -349,16 +349,16 @@ public virtual async Task> GetDataContainerAsync /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDataContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningDataContainer(string name, CancellationToken cancellationToken = default) { - return GetDataContainers().Get(name, cancellationToken); + return GetMachineLearningDataContainers().Get(name, cancellationToken); } - /// Gets a collection of DatastoreResources in the MachineLearningWorkspace. - /// An object representing collection of DatastoreResources and their operations over a DatastoreResource. - public virtual DatastoreCollection GetDatastores() + /// Gets a collection of MachineLearningDatastoreResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningDatastoreResources and their operations over a MachineLearningDatastoreResource. + public virtual MachineLearningDatastoreCollection GetMachineLearningDatastores() { - return GetCachedClient(Client => new DatastoreCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningDatastoreCollection(Client, Id)); } /// @@ -371,9 +371,9 @@ public virtual DatastoreCollection GetDatastores() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetDatastoreAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningDatastoreAsync(string name, CancellationToken cancellationToken = default) { - return await GetDatastores().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningDatastores().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -386,16 +386,16 @@ public virtual async Task> GetDatastoreAsync(string /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetDatastore(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningDatastore(string name, CancellationToken cancellationToken = default) { - return GetDatastores().Get(name, cancellationToken); + return GetMachineLearningDatastores().Get(name, cancellationToken); } - /// Gets a collection of EnvironmentContainerResources in the MachineLearningWorkspace. - /// An object representing collection of EnvironmentContainerResources and their operations over a EnvironmentContainerResource. - public virtual EnvironmentContainerCollection GetEnvironmentContainers() + /// Gets a collection of MachineLearningEnvironmentContainerResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningEnvironmentContainerResources and their operations over a MachineLearningEnvironmentContainerResource. + public virtual MachineLearningEnvironmentContainerCollection GetMachineLearningEnvironmentContainers() { - return GetCachedClient(Client => new EnvironmentContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningEnvironmentContainerCollection(Client, Id)); } /// @@ -408,9 +408,9 @@ public virtual EnvironmentContainerCollection GetEnvironmentContainers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetEnvironmentContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningEnvironmentContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetEnvironmentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningEnvironmentContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -423,9 +423,9 @@ public virtual async Task> GetEnvironment /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetEnvironmentContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningEnvironmentContainer(string name, CancellationToken cancellationToken = default) { - return GetEnvironmentContainers().Get(name, cancellationToken); + return GetMachineLearningEnvironmentContainers().Get(name, cancellationToken); } /// Gets a collection of MachineLearningJobResources in the MachineLearningWorkspace. @@ -465,11 +465,11 @@ public virtual Response GetMachineLearningJob(string return GetMachineLearningJobs().Get(id, cancellationToken); } - /// Gets a collection of ModelContainerResources in the MachineLearningWorkspace. - /// An object representing collection of ModelContainerResources and their operations over a ModelContainerResource. - public virtual ModelContainerCollection GetModelContainers() + /// 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 ModelContainerCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningModelContainerCollection(Client, Id)); } /// @@ -482,9 +482,9 @@ public virtual ModelContainerCollection GetModelContainers() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetModelContainerAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningModelContainerAsync(string name, CancellationToken cancellationToken = default) { - return await GetModelContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningModelContainers().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -497,16 +497,16 @@ public virtual async Task> GetModelContainerAsy /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetModelContainer(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningModelContainer(string name, CancellationToken cancellationToken = default) { - return GetModelContainers().Get(name, cancellationToken); + return GetMachineLearningModelContainers().Get(name, cancellationToken); } - /// Gets a collection of OnlineEndpointResources in the MachineLearningWorkspace. - /// An object representing collection of OnlineEndpointResources and their operations over a OnlineEndpointResource. - public virtual OnlineEndpointCollection GetOnlineEndpoints() + /// Gets a collection of MachineLearningOnlineEndpointResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningOnlineEndpointResources and their operations over a MachineLearningOnlineEndpointResource. + public virtual MachineLearningOnlineEndpointCollection GetMachineLearningOnlineEndpoints() { - return GetCachedClient(Client => new OnlineEndpointCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningOnlineEndpointCollection(Client, Id)); } /// @@ -519,9 +519,9 @@ public virtual OnlineEndpointCollection GetOnlineEndpoints() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetOnlineEndpointAsync(string endpointName, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningOnlineEndpointAsync(string endpointName, CancellationToken cancellationToken = default) { - return await GetOnlineEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningOnlineEndpoints().GetAsync(endpointName, cancellationToken).ConfigureAwait(false); } /// @@ -534,16 +534,16 @@ public virtual async Task> GetOnlineEndpointAsy /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetOnlineEndpoint(string endpointName, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningOnlineEndpoint(string endpointName, CancellationToken cancellationToken = default) { - return GetOnlineEndpoints().Get(endpointName, cancellationToken); + return GetMachineLearningOnlineEndpoints().Get(endpointName, cancellationToken); } - /// Gets a collection of ScheduleResources in the MachineLearningWorkspace. - /// An object representing collection of ScheduleResources and their operations over a ScheduleResource. - public virtual ScheduleCollection GetSchedules() + /// Gets a collection of MachineLearningScheduleResources in the MachineLearningWorkspace. + /// An object representing collection of MachineLearningScheduleResources and their operations over a MachineLearningScheduleResource. + public virtual MachineLearningScheduleCollection GetMachineLearningSchedules() { - return GetCachedClient(Client => new ScheduleCollection(Client, Id)); + return GetCachedClient(Client => new MachineLearningScheduleCollection(Client, Id)); } /// @@ -556,9 +556,9 @@ public virtual ScheduleCollection GetSchedules() /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual async Task> GetScheduleAsync(string name, CancellationToken cancellationToken = default) + public virtual async Task> GetMachineLearningScheduleAsync(string name, CancellationToken cancellationToken = default) { - return await GetSchedules().GetAsync(name, cancellationToken).ConfigureAwait(false); + return await GetMachineLearningSchedules().GetAsync(name, cancellationToken).ConfigureAwait(false); } /// @@ -571,9 +571,9 @@ public virtual async Task> GetScheduleAsync(string na /// is an empty string, and was expected to be non-empty. /// is null. [ForwardsClientCalls] - public virtual Response GetSchedule(string name, CancellationToken cancellationToken = default) + public virtual Response GetMachineLearningSchedule(string name, CancellationToken cancellationToken = default) { - return GetSchedules().Get(name, cancellationToken); + return GetMachineLearningSchedules().Get(name, cancellationToken); } /// @@ -744,14 +744,14 @@ public virtual ArmOperation Update(WaitUntil w /// 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, DiagnoseWorkspaceContent content = null, CancellationToken cancellationToken = default) + 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 DiagnoseResponseResultOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDiagnoseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + 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; @@ -771,14 +771,14 @@ public virtual async Task> DiagnoseAsync(Wa /// 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, DiagnoseWorkspaceContent content = null, CancellationToken cancellationToken = default) + 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 DiagnoseResponseResultOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreateDiagnoseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + 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; @@ -796,7 +796,7 @@ public virtual ArmOperation Diagnose(WaitUntil waitUntil /// Operation Id: Workspaces_ListKeys /// /// The cancellation token to use. - public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetKeys"); scope.Start(); @@ -818,7 +818,7 @@ public virtual async Task> GetKeysAsync(Cancel /// Operation Id: Workspaces_ListKeys /// /// The cancellation token to use. - public virtual Response GetKeys(CancellationToken cancellationToken = default) + public virtual Response GetKeys(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetKeys"); scope.Start(); @@ -892,7 +892,7 @@ public virtual ArmOperation ResyncKeys(WaitUntil waitUntil, CancellationToken ca /// Operation Id: Workspaces_ListNotebookAccessToken /// /// The cancellation token to use. - public virtual async Task> GetNotebookAccessTokenAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetNotebookAccessTokenAsync(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); scope.Start(); @@ -914,7 +914,7 @@ public virtual async Task> GetNotebookAccess /// Operation Id: Workspaces_ListNotebookAccessToken /// /// The cancellation token to use. - public virtual Response GetNotebookAccessToken(CancellationToken cancellationToken = default) + public virtual Response GetNotebookAccessToken(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookAccessToken"); scope.Start(); @@ -937,14 +937,14 @@ public virtual Response GetNotebookAccessToken(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. /// The cancellation token to use. - public virtual async Task> PrepareNotebookAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> PrepareNotebookAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.PrepareNotebook"); scope.Start(); try { var response = await _machineLearningWorkspaceWorkspacesRestClient.PrepareNotebookAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new NotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningNotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -963,14 +963,14 @@ public virtual async Task> PrepareNotebookAsy /// /// 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 PrepareNotebook(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation PrepareNotebook(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.PrepareNotebook"); scope.Start(); try { var response = _machineLearningWorkspaceWorkspacesRestClient.PrepareNotebook(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(new NotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new MachineLearningArmOperation(new MachineLearningNotebookResourceInfoOperationSource(), _machineLearningWorkspaceWorkspacesClientDiagnostics, Pipeline, _machineLearningWorkspaceWorkspacesRestClient.CreatePrepareNotebookRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -988,7 +988,7 @@ public virtual ArmOperation PrepareNotebook(WaitUntil wait /// Operation Id: Workspaces_ListStorageAccountKeys /// /// The cancellation token to use. - public virtual async Task> GetStorageAccountKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetStorageAccountKeysAsync(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); scope.Start(); @@ -1010,7 +1010,7 @@ public virtual async Task> GetStorageAcco /// Operation Id: Workspaces_ListStorageAccountKeys /// /// The cancellation token to use. - public virtual Response GetStorageAccountKeys(CancellationToken cancellationToken = default) + public virtual Response GetStorageAccountKeys(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetStorageAccountKeys"); scope.Start(); @@ -1032,7 +1032,7 @@ public virtual Response GetStorageAccountKeys(Canc /// Operation Id: Workspaces_ListNotebookKeys /// /// The cancellation token to use. - public virtual async Task> GetNotebookKeysAsync(CancellationToken cancellationToken = default) + public virtual async Task> GetNotebookKeysAsync(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); scope.Start(); @@ -1054,7 +1054,7 @@ public virtual async Task> GetNotebookKeysAsync /// Operation Id: Workspaces_ListNotebookKeys /// /// The cancellation token to use. - public virtual Response GetNotebookKeys(CancellationToken cancellationToken = default) + public virtual Response GetNotebookKeys(CancellationToken cancellationToken = default) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetNotebookKeys"); scope.Start(); @@ -1076,10 +1076,10 @@ public virtual Response GetNotebookKeys(CancellationToke /// Operation Id: Workspaces_ListOutboundNetworkDependenciesEndpoints /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints"); scope.Start(); @@ -1103,10 +1103,10 @@ async Task> FirstPageFunc(int? pageSizeHint) /// Operation Id: Workspaces_ListOutboundNetworkDependenciesEndpoints /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using var scope = _machineLearningWorkspaceWorkspacesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetOutboundNetworkDependenciesEndpoints"); scope.Start(); @@ -1184,10 +1184,10 @@ Page FirstPageFunc(int? pageSizeHint) /// Operation Id: WorkspaceFeatures_List /// /// 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetWorkspaceFeaturesAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using var scope = _workspaceFeaturesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetWorkspaceFeatures"); scope.Start(); @@ -1202,7 +1202,7 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = _workspaceFeaturesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetWorkspaceFeatures"); scope.Start(); @@ -1226,10 +1226,10 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint /// Operation Id: WorkspaceFeatures_List /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetWorkspaceFeatures(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetWorkspaceFeatures(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { using var scope = _workspaceFeaturesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetWorkspaceFeatures"); scope.Start(); @@ -1244,7 +1244,7 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = _workspaceFeaturesClientDiagnostics.CreateScope("MachineLearningWorkspaceResource.GetWorkspaceFeatures"); scope.Start(); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerCollection.cs deleted file mode 100644 index fb4dcb946e40..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerCollection.cs +++ /dev/null @@ -1,340 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetModelContainers method from an instance of . - /// - public partial class ModelContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _modelContainerClientDiagnostics; - private readonly ModelContainersRestOperations _modelContainerRestClient; - - /// Initializes a new instance of the class for mocking. - protected ModelContainerCollection() - { - } - - /// 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 ModelContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _modelContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ModelContainerResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ModelContainerResource.ResourceType, out string modelContainerApiVersion); - _modelContainerRestClient = new ModelContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, modelContainerApiVersion); -#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 container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_CreateOrUpdate - /// - /// 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. - /// Container name. This is case-sensitive. - /// Container entity to create or update. - /// 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 name, ModelContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_CreateOrUpdate - /// - /// 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. - /// Container name. This is case-sensitive. - /// Container entity to create or update. - /// 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 name, ModelContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _modelContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.Get"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ModelContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.Get"); - scope.Start(); - try - { - var response = _modelContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ModelContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List model containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models - /// Operation Id: ModelContainers_List - /// - /// Continuation token for pagination. - /// Maximum number of results to return. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, int? count = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.GetAll"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List model containers. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models - /// Operation Id: ModelContainers_List - /// - /// Continuation token for pagination. - /// Maximum number of results to return. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, int? count = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _modelContainerRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.GetAll"); - scope.Start(); - try - { - var response = _modelContainerRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, count, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ModelContainerResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.Exists"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/models/{name} - /// Operation Id: ModelContainers_Get - /// - /// Container name. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerCollection.Exists"); - scope.Start(); - try - { - var response = _modelContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/ModelContainerData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerData.cs deleted file mode 100644 index 293f81eb8810..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the ModelContainer data model. - public partial class ModelContainerData : ResourceData - { - /// Initializes a new instance of ModelContainerData. - /// [Required] Additional attributes of the entity. - /// is null. - public ModelContainerData(ModelContainerProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of ModelContainerData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal ModelContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ModelContainerProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public ModelContainerProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerResource.cs deleted file mode 100644 index 1226a7549ac0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelContainerResource.cs +++ /dev/null @@ -1,286 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a ModelContainer 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 GetModelContainerResource method. - /// Otherwise you can get one from its parent resource using the GetModelContainer method. - /// - public partial class ModelContainerResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _modelContainerClientDiagnostics; - private readonly ModelContainersRestOperations _modelContainerRestClient; - private readonly ModelContainerData _data; - - /// Initializes a new instance of the class for mocking. - protected ModelContainerResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ModelContainerResource(ArmClient client, ModelContainerData 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 ModelContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _modelContainerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string modelContainerApiVersion); - _modelContainerRestClient = new ModelContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, modelContainerApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/models"; - - /// 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 ModelContainerData 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 ModelVersionResources in the ModelContainer. - /// An object representing collection of ModelVersionResources and their operations over a ModelVersionResource. - public virtual ModelVersionCollection GetModelVersions() - { - return GetCachedClient(Client => new ModelVersionCollection(Client, Id)); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetModelVersionAsync(string version, CancellationToken cancellationToken = default) - { - return await GetModelVersions().GetAsync(version, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetModelVersion(string version, CancellationToken cancellationToken = default) - { - return GetModelVersions().Get(version, cancellationToken); - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerResource.Get"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.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 ModelContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerResource.Get"); - scope.Start(); - try - { - var response = _modelContainerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ModelContainerResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Delete - /// - /// 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 = _modelContainerClientDiagnostics.CreateScope("ModelContainerResource.Delete"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_Delete - /// - /// 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 = _modelContainerClientDiagnostics.CreateScope("ModelContainerResource.Delete"); - scope.Start(); - try - { - var response = _modelContainerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ModelContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerResource.Update"); - scope.Start(); - try - { - var response = await _modelContainerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelContainerResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update container. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name} - /// Operation Id: ModelContainers_CreateOrUpdate - /// - /// 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. - /// Container entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ModelContainerData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelContainerClientDiagnostics.CreateScope("ModelContainerResource.Update"); - scope.Start(); - try - { - var response = _modelContainerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelContainerResource(Client, response), response.GetRawResponse())); - 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/ModelVersionCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionCollection.cs deleted file mode 100644 index 99add09f8c12..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionCollection.cs +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetModelVersions method from an instance of . - /// - public partial class ModelVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _modelVersionClientDiagnostics; - private readonly ModelVersionsRestOperations _modelVersionRestClient; - - /// Initializes a new instance of the class for mocking. - protected ModelVersionCollection() - { - } - - /// 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 ModelVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _modelVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ModelVersionResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ModelVersionResource.ResourceType, out string modelVersionApiVersion); - _modelVersionRestClient = new ModelVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, modelVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ModelContainerResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ModelContainerResource.ResourceType), nameof(id)); - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. This is case-sensitive. - /// Version entity to create or update. - /// 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 version, ModelVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_CreateOrUpdate - /// - /// 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. - /// Version identifier. This is case-sensitive. - /// Version entity to create or update. - /// 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 version, ModelVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _modelVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.Get"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ModelVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.Get"); - scope.Start(); - try - { - var response = _modelVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ModelVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List model versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions - /// Operation Id: ModelVersions_List - /// - /// Continuation token for pagination. - /// Ordering of list. - /// Maximum number of records to return. - /// Model version. - /// Model description. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Name of the feed. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.GetAll"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List model versions. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions - /// Operation Id: ModelVersions_List - /// - /// Continuation token for pagination. - /// Ordering of list. - /// Maximum number of records to return. - /// Model version. - /// Model description. - /// Number of initial results to skip. - /// Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - /// Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - /// Name of the feed. - /// View type for including/excluding (for example) archived entities. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _modelVersionRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.GetAll"); - scope.Start(); - try - { - var response = _modelVersionRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, skip, orderBy, top, version, description, offset, tags, properties, feed, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ModelVersionResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.Exists"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, 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}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// Version identifier. This is case-sensitive. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string version, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(version, nameof(version)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionCollection.Exists"); - scope.Start(); - try - { - var response = _modelVersionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, version, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/ModelVersionData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionData.cs deleted file mode 100644 index 25f03bb45e3b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the ModelVersion data model. - public partial class ModelVersionData : ResourceData - { - /// Initializes a new instance of ModelVersionData. - /// [Required] Additional attributes of the entity. - /// is null. - public ModelVersionData(ModelVersionProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of ModelVersionData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal ModelVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ModelVersionProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public ModelVersionProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionResource.cs deleted file mode 100644 index 34407ba57413..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ModelVersionResource.cs +++ /dev/null @@ -1,249 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a ModelVersion 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 GetModelVersionResource method. - /// Otherwise you can get one from its parent resource using the GetModelVersion method. - /// - public partial class ModelVersionResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _modelVersionClientDiagnostics; - private readonly ModelVersionsRestOperations _modelVersionRestClient; - private readonly ModelVersionData _data; - - /// Initializes a new instance of the class for mocking. - protected ModelVersionResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ModelVersionResource(ArmClient client, ModelVersionData 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 ModelVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _modelVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string modelVersionApiVersion); - _modelVersionRestClient = new ModelVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, modelVersionApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/models/versions"; - - /// 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 ModelVersionData 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 version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionResource.Get"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.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 ModelVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionResource.Get"); - scope.Start(); - try - { - var response = _modelVersionRestClient.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 ModelVersionResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Delete - /// - /// 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 = _modelVersionClientDiagnostics.CreateScope("ModelVersionResource.Delete"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_Delete - /// - /// 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 = _modelVersionClientDiagnostics.CreateScope("ModelVersionResource.Delete"); - scope.Start(); - try - { - var response = _modelVersionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ModelVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionResource.Update"); - scope.Start(); - try - { - var response = await _modelVersionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelVersionResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update version. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version} - /// Operation Id: ModelVersions_CreateOrUpdate - /// - /// 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. - /// Version entity to create or update. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ModelVersionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _modelVersionClientDiagnostics.CreateScope("ModelVersionResource.Update"); - scope.Start(); - try - { - var response = _modelVersionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new ModelVersionResource(Client, response), response.GetRawResponse())); - 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/Models/AccountKeyDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreCredentials.Serialization.cs deleted file mode 100644 index c393bfc9bfa4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AccountKeyDatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("secrets"); - writer.WriteObjectValue(Secrets); - writer.WritePropertyName("credentialsType"); - writer.WriteStringValue(CredentialsType.ToString()); - writer.WriteEndObject(); - } - - internal static AccountKeyDatastoreCredentials DeserializeAccountKeyDatastoreCredentials(JsonElement element) - { - AccountKeyDatastoreSecrets secrets = default; - CredentialsType credentialsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("secrets")) - { - secrets = AccountKeyDatastoreSecrets.DeserializeAccountKeyDatastoreSecrets(property.Value); - continue; - } - if (property.NameEquals("credentialsType")) - { - credentialsType = new CredentialsType(property.Value.GetString()); - continue; - } - } - return new AccountKeyDatastoreCredentials(credentialsType, secrets); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreCredentials.cs deleted file mode 100644 index 5fb43ffe7e77..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreCredentials.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Account key datastore credentials configuration. - public partial class AccountKeyDatastoreCredentials : DatastoreCredentials - { - /// Initializes a new instance of AccountKeyDatastoreCredentials. - /// [Required] Storage account secrets. - /// is null. - public AccountKeyDatastoreCredentials(AccountKeyDatastoreSecrets secrets) - { - Argument.AssertNotNull(secrets, nameof(secrets)); - - Secrets = secrets; - CredentialsType = CredentialsType.AccountKey; - } - - /// Initializes a new instance of AccountKeyDatastoreCredentials. - /// [Required] Credential type used to authentication with storage. - /// [Required] Storage account secrets. - internal AccountKeyDatastoreCredentials(CredentialsType credentialsType, AccountKeyDatastoreSecrets secrets) : base(credentialsType) - { - Secrets = secrets; - CredentialsType = credentialsType; - } - - /// [Required] Storage account secrets. - public AccountKeyDatastoreSecrets Secrets { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreSecrets.Serialization.cs deleted file mode 100644 index fd1afe7399dc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreSecrets.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AccountKeyDatastoreSecrets : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Key)) - { - if (Key != null) - { - writer.WritePropertyName("key"); - writer.WriteStringValue(Key); - } - else - { - writer.WriteNull("key"); - } - } - writer.WritePropertyName("secretsType"); - writer.WriteStringValue(SecretsType.ToString()); - writer.WriteEndObject(); - } - - internal static AccountKeyDatastoreSecrets DeserializeAccountKeyDatastoreSecrets(JsonElement element) - { - Optional key = default; - SecretsType secretsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("key")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - key = null; - continue; - } - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("secretsType")) - { - secretsType = new SecretsType(property.Value.GetString()); - continue; - } - } - return new AccountKeyDatastoreSecrets(secretsType, key.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreSecrets.cs deleted file mode 100644 index 2757537bf4b2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AccountKeyDatastoreSecrets.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Datastore account key secrets. - public partial class AccountKeyDatastoreSecrets : DatastoreSecrets - { - /// Initializes a new instance of AccountKeyDatastoreSecrets. - public AccountKeyDatastoreSecrets() - { - SecretsType = SecretsType.AccountKey; - } - - /// Initializes a new instance of AccountKeyDatastoreSecrets. - /// [Required] Credential type used to authentication with storage. - /// Storage account key. - internal AccountKeyDatastoreSecrets(SecretsType secretsType, string key) : base(secretsType) - { - Key = key; - SecretsType = secretsType; - } - - /// Storage account key. - public string Key { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksCompute.Serialization.cs deleted file mode 100644 index e1f00f4bb285..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AksCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static AksCompute DeserializeAksCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = AksSchemaProperties.DeserializeAksSchemaProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new AksCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksCompute.cs deleted file mode 100644 index 84fa9b4813ef..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksCompute.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 -{ - /// A Machine Learning compute based on AKS. - public partial class AksCompute : Compute - { - /// Initializes a new instance of AksCompute. - public AksCompute() - { - ComputeType = ComputeType.Aks; - } - - /// Initializes a new instance of AksCompute. - /// 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. - /// AKS properties. - internal AksCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, AksSchemaProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// AKS properties. - public AksSchemaProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksComputeSecrets.Serialization.cs deleted file mode 100644 index b76e1be617e2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksComputeSecrets.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AksComputeSecrets - { - internal static AksComputeSecrets DeserializeAksComputeSecrets(JsonElement element) - { - Optional userKubeConfig = default; - Optional adminKubeConfig = default; - Optional imagePullSecretName = default; - ComputeType computeType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userKubeConfig")) - { - userKubeConfig = property.Value.GetString(); - continue; - } - if (property.NameEquals("adminKubeConfig")) - { - adminKubeConfig = property.Value.GetString(); - continue; - } - if (property.NameEquals("imagePullSecretName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - imagePullSecretName = null; - continue; - } - imagePullSecretName = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - } - return new AksComputeSecrets(computeType, userKubeConfig.Value, adminKubeConfig.Value, imagePullSecretName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksComputeSecrets.cs deleted file mode 100644 index 9222558be5bc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksComputeSecrets.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Secrets related to a Machine Learning compute based on AKS. - public partial class AksComputeSecrets : ComputeSecrets - { - /// Initializes a new instance of AksComputeSecrets. - internal AksComputeSecrets() - { - ComputeType = ComputeType.Aks; - } - - /// Initializes a new instance of AksComputeSecrets. - /// The type of compute. - /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - /// Image registry pull secret. - internal AksComputeSecrets(ComputeType computeType, string userKubeConfig, string adminKubeConfig, string imagePullSecretName) : base(computeType) - { - UserKubeConfig = userKubeConfig; - AdminKubeConfig = adminKubeConfig; - ImagePullSecretName = imagePullSecretName; - ComputeType = computeType; - } - - /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - public string UserKubeConfig { get; } - /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. - public string AdminKubeConfig { get; } - /// Image registry pull secret. - public string ImagePullSecretName { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs deleted file mode 100644 index 26d9f8c760cb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksNetworkingConfiguration.Serialization.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AksNetworkingConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SubnetId)) - { - writer.WritePropertyName("subnetId"); - writer.WriteStringValue(SubnetId); - } - if (Optional.IsDefined(ServiceCidr)) - { - writer.WritePropertyName("serviceCidr"); - writer.WriteStringValue(ServiceCidr); - } - if (Optional.IsDefined(DnsServiceIP)) - { - writer.WritePropertyName("dnsServiceIP"); - writer.WriteStringValue(DnsServiceIP); - } - if (Optional.IsDefined(DockerBridgeCidr)) - { - writer.WritePropertyName("dockerBridgeCidr"); - writer.WriteStringValue(DockerBridgeCidr); - } - writer.WriteEndObject(); - } - - internal static AksNetworkingConfiguration DeserializeAksNetworkingConfiguration(JsonElement element) - { - Optional subnetId = default; - Optional serviceCidr = default; - Optional dnsServiceIP = default; - Optional dockerBridgeCidr = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("subnetId")) - { - subnetId = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceCidr")) - { - serviceCidr = property.Value.GetString(); - continue; - } - if (property.NameEquals("dnsServiceIP")) - { - dnsServiceIP = property.Value.GetString(); - continue; - } - if (property.NameEquals("dockerBridgeCidr")) - { - dockerBridgeCidr = property.Value.GetString(); - continue; - } - } - return new AksNetworkingConfiguration(subnetId.Value, serviceCidr.Value, dnsServiceIP.Value, dockerBridgeCidr.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksNetworkingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksNetworkingConfiguration.cs deleted file mode 100644 index 284bfb5dc31f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksNetworkingConfiguration.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Advance configuration for AKS networking. - public partial class AksNetworkingConfiguration - { - /// Initializes a new instance of AksNetworkingConfiguration. - public AksNetworkingConfiguration() - { - } - - /// Initializes a new instance of AksNetworkingConfiguration. - /// Virtual network subnet resource ID the compute nodes belong to. - /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. - /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. - internal AksNetworkingConfiguration(string subnetId, string serviceCidr, string dnsServiceIP, string dockerBridgeCidr) - { - SubnetId = subnetId; - ServiceCidr = serviceCidr; - DnsServiceIP = dnsServiceIP; - DockerBridgeCidr = dockerBridgeCidr; - } - - /// Virtual network subnet resource ID the compute nodes belong to. - public string SubnetId { get; set; } - /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - public string ServiceCidr { get; set; } - /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. - public string DnsServiceIP { get; set; } - /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. - public string DockerBridgeCidr { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksSchemaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksSchemaProperties.Serialization.cs deleted file mode 100644 index 3398296cc475..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksSchemaProperties.Serialization.cs +++ /dev/null @@ -1,216 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AksSchemaProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ClusterFqdn)) - { - if (ClusterFqdn != null) - { - writer.WritePropertyName("clusterFqdn"); - writer.WriteStringValue(ClusterFqdn); - } - else - { - writer.WriteNull("clusterFqdn"); - } - } - if (Optional.IsDefined(AgentCount)) - { - if (AgentCount != null) - { - writer.WritePropertyName("agentCount"); - writer.WriteNumberValue(AgentCount.Value); - } - else - { - writer.WriteNull("agentCount"); - } - } - if (Optional.IsDefined(AgentVmSize)) - { - if (AgentVmSize != null) - { - writer.WritePropertyName("agentVmSize"); - writer.WriteStringValue(AgentVmSize); - } - else - { - writer.WriteNull("agentVmSize"); - } - } - if (Optional.IsDefined(ClusterPurpose)) - { - writer.WritePropertyName("clusterPurpose"); - writer.WriteStringValue(ClusterPurpose.Value.ToString()); - } - if (Optional.IsDefined(SslConfiguration)) - { - if (SslConfiguration != null) - { - writer.WritePropertyName("sslConfiguration"); - writer.WriteObjectValue(SslConfiguration); - } - else - { - writer.WriteNull("sslConfiguration"); - } - } - if (Optional.IsDefined(AksNetworkingConfiguration)) - { - if (AksNetworkingConfiguration != null) - { - writer.WritePropertyName("aksNetworkingConfiguration"); - writer.WriteObjectValue(AksNetworkingConfiguration); - } - else - { - writer.WriteNull("aksNetworkingConfiguration"); - } - } - if (Optional.IsDefined(LoadBalancerType)) - { - writer.WritePropertyName("loadBalancerType"); - writer.WriteStringValue(LoadBalancerType.Value.ToString()); - } - if (Optional.IsDefined(LoadBalancerSubnet)) - { - if (LoadBalancerSubnet != null) - { - writer.WritePropertyName("loadBalancerSubnet"); - writer.WriteStringValue(LoadBalancerSubnet); - } - else - { - writer.WriteNull("loadBalancerSubnet"); - } - } - writer.WriteEndObject(); - } - - internal static AksSchemaProperties DeserializeAksSchemaProperties(JsonElement element) - { - Optional clusterFqdn = default; - Optional> systemServices = default; - Optional agentCount = default; - Optional agentVmSize = default; - Optional clusterPurpose = default; - Optional sslConfiguration = default; - Optional aksNetworkingConfiguration = default; - Optional loadBalancerType = default; - Optional loadBalancerSubnet = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clusterFqdn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - clusterFqdn = null; - continue; - } - clusterFqdn = property.Value.GetString(); - continue; - } - if (property.NameEquals("systemServices")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - systemServices = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SystemService.DeserializeSystemService(item)); - } - systemServices = array; - continue; - } - if (property.NameEquals("agentCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - agentCount = null; - continue; - } - agentCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("agentVmSize")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - agentVmSize = null; - continue; - } - agentVmSize = property.Value.GetString(); - continue; - } - if (property.NameEquals("clusterPurpose")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - clusterPurpose = new ClusterPurpose(property.Value.GetString()); - continue; - } - if (property.NameEquals("sslConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - sslConfiguration = null; - continue; - } - sslConfiguration = SslConfiguration.DeserializeSslConfiguration(property.Value); - continue; - } - if (property.NameEquals("aksNetworkingConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - aksNetworkingConfiguration = null; - continue; - } - aksNetworkingConfiguration = AksNetworkingConfiguration.DeserializeAksNetworkingConfiguration(property.Value); - continue; - } - if (property.NameEquals("loadBalancerType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - loadBalancerType = new LoadBalancerType(property.Value.GetString()); - continue; - } - if (property.NameEquals("loadBalancerSubnet")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - loadBalancerSubnet = null; - continue; - } - loadBalancerSubnet = property.Value.GetString(); - continue; - } - } - return new AksSchemaProperties(clusterFqdn.Value, Optional.ToList(systemServices), Optional.ToNullable(agentCount), agentVmSize.Value, Optional.ToNullable(clusterPurpose), sslConfiguration.Value, aksNetworkingConfiguration.Value, Optional.ToNullable(loadBalancerType), loadBalancerSubnet.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksSchemaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksSchemaProperties.cs deleted file mode 100644 index 58a965aa08e4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AksSchemaProperties.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// AKS properties. - public partial class AksSchemaProperties - { - /// Initializes a new instance of AksSchemaProperties. - public AksSchemaProperties() - { - SystemServices = new ChangeTrackingList(); - } - - /// Initializes a new instance of AksSchemaProperties. - /// Cluster full qualified domain name. - /// System services. - /// Number of agents. - /// Agent virtual machine size. - /// Intended usage of the cluster. - /// SSL configuration. - /// AKS networking configuration for vnet. - /// Load Balancer Type. - /// Load Balancer Subnet. - internal AksSchemaProperties(string clusterFqdn, IReadOnlyList systemServices, int? agentCount, string agentVmSize, ClusterPurpose? clusterPurpose, SslConfiguration sslConfiguration, AksNetworkingConfiguration aksNetworkingConfiguration, LoadBalancerType? loadBalancerType, string loadBalancerSubnet) - { - ClusterFqdn = clusterFqdn; - SystemServices = systemServices; - AgentCount = agentCount; - AgentVmSize = agentVmSize; - ClusterPurpose = clusterPurpose; - SslConfiguration = sslConfiguration; - AksNetworkingConfiguration = aksNetworkingConfiguration; - LoadBalancerType = loadBalancerType; - LoadBalancerSubnet = loadBalancerSubnet; - } - - /// Cluster full qualified domain name. - public string ClusterFqdn { get; set; } - /// System services. - public IReadOnlyList SystemServices { get; } - /// Number of agents. - public int? AgentCount { get; set; } - /// Agent virtual machine size. - public string AgentVmSize { get; set; } - /// Intended usage of the cluster. - public ClusterPurpose? ClusterPurpose { get; set; } - /// SSL configuration. - public SslConfiguration SslConfiguration { get; set; } - /// AKS networking configuration for vnet. - public AksNetworkingConfiguration AksNetworkingConfiguration { get; set; } - /// Load Balancer Type. - public LoadBalancerType? LoadBalancerType { get; set; } - /// Load Balancer Subnet. - public string LoadBalancerSubnet { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AllocationState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AllocationState.cs deleted file mode 100644 index b38e67b29137..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AllocationState.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 -{ - /// Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. - public readonly partial struct AllocationState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AllocationState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SteadyValue = "Steady"; - private const string ResizingValue = "Resizing"; - - /// Steady. - public static AllocationState Steady { get; } = new AllocationState(SteadyValue); - /// Resizing. - public static AllocationState Resizing { get; } = new AllocationState(ResizingValue); - /// Determines if two values are the same. - public static bool operator ==(AllocationState left, AllocationState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AllocationState left, AllocationState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator AllocationState(string value) => new AllocationState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AllocationState other && Equals(other); - /// - public bool Equals(AllocationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlAllocationState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlAllocationState.cs new file mode 100644 index 000000000000..e1b72809d0d2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlAllocationState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + /// Serialized Name: AllocationState + /// + public readonly partial struct AmlAllocationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AmlAllocationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SteadyValue = "Steady"; + private const string ResizingValue = "Resizing"; + + /// + /// Steady + /// Serialized Name: AllocationState.Steady + /// + public static AmlAllocationState Steady { get; } = new AmlAllocationState(SteadyValue); + /// + /// Resizing + /// Serialized Name: AllocationState.Resizing + /// + public static AmlAllocationState Resizing { get; } = new AmlAllocationState(ResizingValue); + /// Determines if two values are the same. + public static bool operator ==(AmlAllocationState left, AmlAllocationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AmlAllocationState left, AmlAllocationState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AmlAllocationState(string value) => new AmlAllocationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AmlAllocationState other && Equals(other); + /// + public bool Equals(AmlAllocationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.Serialization.cs index 61e746b6a2af..03bd5e43d282 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.Serialization.cs @@ -66,12 +66,12 @@ internal static AmlCompute DeserializeAmlCompute(JsonElement element) Optional properties = default; ComputeType computeType = default; Optional computeLocation = default; - Optional provisioningState = default; + Optional provisioningState = default; Optional description = default; Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) @@ -103,7 +103,7 @@ internal static AmlCompute DeserializeAmlCompute(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("description")) @@ -153,10 +153,10 @@ internal static AmlCompute DeserializeAmlCompute(JsonElement element) provisioningErrors = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); } provisioningErrors = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.cs index fcbd8f874d91..8a4746c58b9b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlCompute.cs @@ -11,8 +11,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// An Azure Machine Learning compute. - public partial class AmlCompute : Compute + /// + /// An Azure Machine Learning compute. + /// Serialized Name: AmlCompute + /// + public partial class AmlCompute : MachineLearningComputeProperties { /// Initializes a new instance of AmlCompute. public AmlCompute() @@ -21,24 +24,60 @@ public AmlCompute() } /// Initializes a new instance of AmlCompute. - /// 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. - /// Properties of AmlCompute. - internal AmlCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, AmlComputeProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// + /// Properties of AmlCompute + /// Serialized Name: AmlComputeSchema.properties + /// + internal AmlCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, AmlComputeProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { Properties = properties; ComputeType = computeType; } - /// Properties of AmlCompute. + /// + /// Properties of AmlCompute + /// Serialized Name: AmlComputeSchema.properties + /// public AmlComputeProperties Properties { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs index 46c54433b4f9..71baa2eb197f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.Serialization.cs @@ -18,7 +18,7 @@ internal static AmlComputeNodeInformation DeserializeAmlComputeNodeInformation(J Optional privateIPAddress = default; Optional publicIPAddress = default; Optional port = default; - Optional nodeState = default; + Optional nodeState = default; Optional runId = default; foreach (var property in element.EnumerateObject()) { @@ -64,7 +64,7 @@ internal static AmlComputeNodeInformation DeserializeAmlComputeNodeInformation(J property.ThrowNonNullablePropertyIsNull(); continue; } - nodeState = new NodeState(property.Value.GetString()); + nodeState = new MachineLearningNodeState(property.Value.GetString()); continue; } if (property.NameEquals("runId")) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.cs index 937d5df31415..69ae1baf3af4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodeInformation.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Compute node information related to a AmlCompute. + /// + /// Compute node information related to a AmlCompute. + /// Serialized Name: AmlComputeNodeInformation + /// public partial class AmlComputeNodeInformation { /// Initializes a new instance of AmlComputeNodeInformation. @@ -16,13 +19,31 @@ internal AmlComputeNodeInformation() } /// Initializes a new instance of AmlComputeNodeInformation. - /// 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. - internal AmlComputeNodeInformation(string nodeId, string privateIPAddress, string publicIPAddress, int? port, NodeState? nodeState, string runId) + /// + /// ID of the compute node. + /// Serialized Name: AmlComputeNodeInformation.nodeId + /// + /// + /// Private IP address of the compute node. + /// Serialized Name: AmlComputeNodeInformation.privateIpAddress + /// + /// + /// Public IP address of the compute node. + /// Serialized Name: AmlComputeNodeInformation.publicIpAddress + /// + /// + /// SSH port number of the node. + /// Serialized Name: AmlComputeNodeInformation.port + /// + /// + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + /// Serialized Name: AmlComputeNodeInformation.nodeState + /// + /// + /// ID of the Experiment running on the node, if any else null. + /// Serialized Name: AmlComputeNodeInformation.runId + /// + internal AmlComputeNodeInformation(string nodeId, string privateIPAddress, string publicIPAddress, int? port, MachineLearningNodeState? nodeState, string runId) { NodeId = nodeId; PrivateIPAddress = privateIPAddress; @@ -32,17 +53,35 @@ internal AmlComputeNodeInformation(string nodeId, string privateIPAddress, strin RunId = runId; } - /// ID of the compute node. + /// + /// ID of the compute node. + /// Serialized Name: AmlComputeNodeInformation.nodeId + /// public string NodeId { get; } - /// Private IP address of the compute node. + /// + /// Private IP address of the compute node. + /// Serialized Name: AmlComputeNodeInformation.privateIpAddress + /// public string PrivateIPAddress { get; } - /// Public IP address of the compute node. + /// + /// Public IP address of the compute node. + /// Serialized Name: AmlComputeNodeInformation.publicIpAddress + /// public string PublicIPAddress { get; } - /// SSH port number of the node. + /// + /// SSH port number of the node. + /// Serialized Name: AmlComputeNodeInformation.port + /// public int? Port { get; } - /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. - public NodeState? NodeState { get; } - /// ID of the Experiment running on the node, if any else null. + /// + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + /// Serialized Name: AmlComputeNodeInformation.nodeState + /// + public MachineLearningNodeState? NodeState { get; } + /// + /// ID of the Experiment running on the node, if any else null. + /// Serialized Name: AmlComputeNodeInformation.runId + /// public string RunId { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodesInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodesInformation.cs index 8b92e88fc624..5c39dddec762 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodesInformation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeNodesInformation.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Result of AmlCompute Nodes. + /// + /// Result of AmlCompute Nodes + /// Serialized Name: AmlComputeNodesInformation + /// internal partial class AmlComputeNodesInformation { /// Initializes a new instance of AmlComputeNodesInformation. @@ -20,17 +23,29 @@ internal AmlComputeNodesInformation() } /// Initializes a new instance of AmlComputeNodesInformation. - /// The collection of returned AmlCompute nodes details. - /// The continuation token. + /// + /// The collection of returned AmlCompute nodes details. + /// Serialized Name: AmlComputeNodesInformation.nodes + /// + /// + /// The continuation token. + /// Serialized Name: AmlComputeNodesInformation.nextLink + /// internal AmlComputeNodesInformation(IReadOnlyList nodes, string nextLink) { Nodes = nodes; NextLink = nextLink; } - /// The collection of returned AmlCompute nodes details. + /// + /// The collection of returned AmlCompute nodes details. + /// Serialized Name: AmlComputeNodesInformation.nodes + /// public IReadOnlyList Nodes { get; } - /// The continuation token. + /// + /// The continuation token. + /// Serialized Name: AmlComputeNodesInformation.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.Serialization.cs index 7c56931b96a6..49fbffb4bfd6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.Serialization.cs @@ -116,21 +116,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement element) { - Optional osType = default; + Optional osType = default; Optional vmSize = default; - Optional vmPriority = default; + Optional vmPriority = default; Optional virtualMachineImage = default; Optional isolatedNetwork = default; - Optional scaleSettings = default; - Optional userAccountCredentials = default; + Optional scaleSettings = default; + Optional userAccountCredentials = default; Optional subnet = default; - Optional remoteLoginPortPublicAccess = default; - Optional allocationState = default; + Optional remoteLoginPortPublicAccess = default; + Optional allocationState = default; Optional allocationStateTransitionTime = default; - Optional> errors = default; + Optional> errors = default; Optional currentNodeCount = default; Optional targetNodeCount = default; - Optional nodeStateCounts = default; + Optional nodeStateCounts = default; Optional enableNodePublicIP = default; Optional propertyBag = default; foreach (var property in element.EnumerateObject()) @@ -142,7 +142,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - osType = new OSType(property.Value.GetString()); + osType = new MachineLearningOSType(property.Value.GetString()); continue; } if (property.NameEquals("vmSize")) @@ -157,7 +157,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - vmPriority = new VmPriority(property.Value.GetString()); + vmPriority = new MachineLearningVmPriority(property.Value.GetString()); continue; } if (property.NameEquals("virtualMachineImage")) @@ -187,7 +187,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - scaleSettings = ScaleSettings.DeserializeScaleSettings(property.Value); + scaleSettings = AmlComputeScaleSettings.DeserializeAmlComputeScaleSettings(property.Value); continue; } if (property.NameEquals("userAccountCredentials")) @@ -197,7 +197,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement userAccountCredentials = null; continue; } - userAccountCredentials = UserAccountCredentials.DeserializeUserAccountCredentials(property.Value); + userAccountCredentials = MachineLearningUserAccountCredentials.DeserializeMachineLearningUserAccountCredentials(property.Value); continue; } if (property.NameEquals("subnet")) @@ -217,7 +217,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - remoteLoginPortPublicAccess = new RemoteLoginPortPublicAccess(property.Value.GetString()); + remoteLoginPortPublicAccess = new MachineLearningRemoteLoginPortPublicAccess(property.Value.GetString()); continue; } if (property.NameEquals("allocationState")) @@ -227,7 +227,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - allocationState = new AllocationState(property.Value.GetString()); + allocationState = new AmlAllocationState(property.Value.GetString()); continue; } if (property.NameEquals("allocationStateTransitionTime")) @@ -247,10 +247,10 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement errors = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); } errors = array; continue; @@ -282,7 +282,7 @@ internal static AmlComputeProperties DeserializeAmlComputeProperties(JsonElement nodeStateCounts = null; continue; } - nodeStateCounts = NodeStateCounts.DeserializeNodeStateCounts(property.Value); + nodeStateCounts = MachineLearningNodeStateCounts.DeserializeMachineLearningNodeStateCounts(property.Value); continue; } if (property.NameEquals("enableNodePublicIp")) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.cs index 2dacd2fa90de..ea0c0b6359f4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeProperties.cs @@ -11,34 +11,88 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// AML Compute properties. + /// + /// AML Compute properties + /// Serialized Name: AmlComputeProperties + /// public partial class AmlComputeProperties { /// Initializes a new instance of AmlComputeProperties. public AmlComputeProperties() { - Errors = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of AmlComputeProperties. - /// Compute OS Type. - /// Virtual Machine Size. - /// Virtual Machine priority. - /// Virtual Machine image for AML Compute - windows only. - /// Network is isolated or not. - /// Scale settings for AML Compute. - /// Credentials for an administrator user account that will be created on each compute node. - /// Virtual network subnet resource ID the compute nodes belong to. - /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. - /// Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. - /// The time at which the compute entered its current allocation state. - /// Collection of errors encountered by various compute nodes during node setup. - /// The number of compute nodes currently assigned to the compute. - /// The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. - /// Counts of various node states on the compute. - /// 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. - /// A property bag containing additional properties. - internal AmlComputeProperties(OSType? osType, string vmSize, VmPriority? vmPriority, VirtualMachineImage virtualMachineImage, bool? isolatedNetwork, ScaleSettings scaleSettings, UserAccountCredentials userAccountCredentials, ResourceId subnet, RemoteLoginPortPublicAccess? remoteLoginPortPublicAccess, AllocationState? allocationState, DateTimeOffset? allocationStateTransitionOn, IReadOnlyList errors, int? currentNodeCount, int? targetNodeCount, NodeStateCounts nodeStateCounts, bool? enableNodePublicIP, BinaryData propertyBag) + /// + /// Compute OS Type + /// Serialized Name: AmlComputeProperties.osType + /// + /// + /// Virtual Machine Size + /// Serialized Name: AmlComputeProperties.vmSize + /// + /// + /// Virtual Machine priority + /// Serialized Name: AmlComputeProperties.vmPriority + /// + /// + /// Virtual Machine image for AML Compute - windows only + /// Serialized Name: AmlComputeProperties.virtualMachineImage + /// + /// + /// Network is isolated or not + /// Serialized Name: AmlComputeProperties.isolatedNetwork + /// + /// + /// Scale settings for AML Compute + /// Serialized Name: AmlComputeProperties.scaleSettings + /// + /// + /// Credentials for an administrator user account that will be created on each compute node. + /// Serialized Name: AmlComputeProperties.userAccountCredentials + /// + /// + /// Virtual network subnet resource ID the compute nodes belong to. + /// Serialized Name: AmlComputeProperties.subnet + /// + /// + /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. + /// Serialized Name: AmlComputeProperties.remoteLoginPortPublicAccess + /// + /// + /// Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + /// Serialized Name: AmlComputeProperties.allocationState + /// + /// + /// The time at which the compute entered its current allocation state. + /// Serialized Name: AmlComputeProperties.allocationStateTransitionTime + /// + /// + /// Collection of errors encountered by various compute nodes during node setup. + /// Serialized Name: AmlComputeProperties.errors + /// + /// + /// The number of compute nodes currently assigned to the compute. + /// Serialized Name: AmlComputeProperties.currentNodeCount + /// + /// + /// The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. + /// Serialized Name: AmlComputeProperties.targetNodeCount + /// + /// + /// Counts of various node states on the compute. + /// Serialized Name: AmlComputeProperties.nodeStateCounts + /// + /// + /// 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. + /// Serialized Name: AmlComputeProperties.enableNodePublicIp + /// + /// + /// A property bag containing additional properties. + /// Serialized Name: AmlComputeProperties.propertyBag + /// + internal AmlComputeProperties(MachineLearningOSType? osType, string vmSize, MachineLearningVmPriority? vmPriority, VirtualMachineImage virtualMachineImage, bool? isolatedNetwork, AmlComputeScaleSettings scaleSettings, MachineLearningUserAccountCredentials userAccountCredentials, ResourceId subnet, MachineLearningRemoteLoginPortPublicAccess? remoteLoginPortPublicAccess, AmlAllocationState? allocationState, DateTimeOffset? allocationStateTransitionOn, IReadOnlyList errors, int? currentNodeCount, int? targetNodeCount, MachineLearningNodeStateCounts nodeStateCounts, bool? enableNodePublicIP, BinaryData propertyBag) { OSType = osType; VmSize = vmSize; @@ -59,54 +113,109 @@ internal AmlComputeProperties(OSType? osType, string vmSize, VmPriority? vmPrior PropertyBag = propertyBag; } - /// Compute OS Type. - public OSType? OSType { get; set; } - /// Virtual Machine Size. + /// + /// Compute OS Type + /// Serialized Name: AmlComputeProperties.osType + /// + public MachineLearningOSType? OSType { get; set; } + /// + /// Virtual Machine Size + /// Serialized Name: AmlComputeProperties.vmSize + /// public string VmSize { get; set; } - /// Virtual Machine priority. - public VmPriority? VmPriority { get; set; } - /// Virtual Machine image for AML Compute - windows only. + /// + /// Virtual Machine priority + /// Serialized Name: AmlComputeProperties.vmPriority + /// + public MachineLearningVmPriority? VmPriority { get; set; } + /// + /// Virtual Machine image for AML Compute - windows only + /// Serialized Name: AmlComputeProperties.virtualMachineImage + /// internal VirtualMachineImage VirtualMachineImage { get; set; } - /// Virtual Machine image path. + /// + /// Virtual Machine image path + /// Serialized Name: VirtualMachineImage.id + /// public string VirtualMachineImageId { get => VirtualMachineImage is null ? default : VirtualMachineImage.Id; set => VirtualMachineImage = new VirtualMachineImage(value); } - /// Network is isolated or not. + /// + /// Network is isolated or not + /// Serialized Name: AmlComputeProperties.isolatedNetwork + /// public bool? IsolatedNetwork { get; set; } - /// Scale settings for AML Compute. - public ScaleSettings ScaleSettings { get; set; } - /// Credentials for an administrator user account that will be created on each compute node. - public UserAccountCredentials UserAccountCredentials { get; set; } - /// Virtual network subnet resource ID the compute nodes belong to. + /// + /// Scale settings for AML Compute + /// Serialized Name: AmlComputeProperties.scaleSettings + /// + public AmlComputeScaleSettings ScaleSettings { get; set; } + /// + /// Credentials for an administrator user account that will be created on each compute node. + /// Serialized Name: AmlComputeProperties.userAccountCredentials + /// + public MachineLearningUserAccountCredentials UserAccountCredentials { get; set; } + /// + /// Virtual network subnet resource ID the compute nodes belong to. + /// Serialized Name: AmlComputeProperties.subnet + /// internal ResourceId Subnet { get; set; } - /// The ID of the resource. + /// + /// The ID of the resource + /// Serialized Name: ResourceId.id + /// public string SubnetId { get => Subnet is null ? default : Subnet.Id; set => Subnet = new ResourceId(value); } - /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. - public RemoteLoginPortPublicAccess? RemoteLoginPortPublicAccess { get; set; } - /// Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. - public AllocationState? AllocationState { get; } - /// The time at which the compute entered its current allocation state. + /// + /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. + /// Serialized Name: AmlComputeProperties.remoteLoginPortPublicAccess + /// + public MachineLearningRemoteLoginPortPublicAccess? RemoteLoginPortPublicAccess { get; set; } + /// + /// Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. + /// Serialized Name: AmlComputeProperties.allocationState + /// + public AmlAllocationState? AllocationState { get; } + /// + /// The time at which the compute entered its current allocation state. + /// Serialized Name: AmlComputeProperties.allocationStateTransitionTime + /// public DateTimeOffset? AllocationStateTransitionOn { get; } - /// Collection of errors encountered by various compute nodes during node setup. - public IReadOnlyList Errors { get; } - /// The number of compute nodes currently assigned to the compute. + /// + /// Collection of errors encountered by various compute nodes during node setup. + /// Serialized Name: AmlComputeProperties.errors + /// + public IReadOnlyList Errors { get; } + /// + /// The number of compute nodes currently assigned to the compute. + /// Serialized Name: AmlComputeProperties.currentNodeCount + /// public int? CurrentNodeCount { get; } - /// The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. + /// + /// The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation. + /// Serialized Name: AmlComputeProperties.targetNodeCount + /// public int? TargetNodeCount { get; } - /// Counts of various node states on the compute. - public NodeStateCounts NodeStateCounts { get; } - /// 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. + /// + /// Counts of various node states on the compute. + /// Serialized Name: AmlComputeProperties.nodeStateCounts + /// + public MachineLearningNodeStateCounts NodeStateCounts { get; } + /// + /// 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. + /// Serialized Name: AmlComputeProperties.enableNodePublicIp + /// public bool? EnableNodePublicIP { get; set; } /// /// A property bag containing additional properties. + /// Serialized Name: AmlComputeProperties.propertyBag /// /// To assign an object to this property use . /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeScaleSettings.Serialization.cs new file mode 100644 index 000000000000..f0278d021ef3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeScaleSettings.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AmlComputeScaleSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("maxNodeCount"); + writer.WriteNumberValue(MaxNodeCount); + if (Optional.IsDefined(MinNodeCount)) + { + writer.WritePropertyName("minNodeCount"); + writer.WriteNumberValue(MinNodeCount.Value); + } + if (Optional.IsDefined(NodeIdleTimeBeforeScaleDown)) + { + if (NodeIdleTimeBeforeScaleDown != null) + { + writer.WritePropertyName("nodeIdleTimeBeforeScaleDown"); + writer.WriteStringValue(NodeIdleTimeBeforeScaleDown.Value, "P"); + } + else + { + writer.WriteNull("nodeIdleTimeBeforeScaleDown"); + } + } + writer.WriteEndObject(); + } + + internal static AmlComputeScaleSettings DeserializeAmlComputeScaleSettings(JsonElement element) + { + int maxNodeCount = default; + Optional minNodeCount = default; + Optional nodeIdleTimeBeforeScaleDown = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxNodeCount")) + { + maxNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeIdleTimeBeforeScaleDown")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nodeIdleTimeBeforeScaleDown = null; + continue; + } + nodeIdleTimeBeforeScaleDown = property.Value.GetTimeSpan("P"); + continue; + } + } + return new AmlComputeScaleSettings(maxNodeCount, Optional.ToNullable(minNodeCount), Optional.ToNullable(nodeIdleTimeBeforeScaleDown)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeScaleSettings.cs new file mode 100644 index 000000000000..2a084710c154 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlComputeScaleSettings.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// scale settings for AML Compute + /// Serialized Name: ScaleSettings + /// + public partial class AmlComputeScaleSettings + { + /// Initializes a new instance of AmlComputeScaleSettings. + /// + /// Max number of nodes to use + /// Serialized Name: ScaleSettings.maxNodeCount + /// + public AmlComputeScaleSettings(int maxNodeCount) + { + MaxNodeCount = maxNodeCount; + } + + /// Initializes a new instance of AmlComputeScaleSettings. + /// + /// Max number of nodes to use + /// Serialized Name: ScaleSettings.maxNodeCount + /// + /// + /// Min number of nodes to use + /// Serialized Name: ScaleSettings.minNodeCount + /// + /// + /// Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. + /// Serialized Name: ScaleSettings.nodeIdleTimeBeforeScaleDown + /// + internal AmlComputeScaleSettings(int maxNodeCount, int? minNodeCount, TimeSpan? nodeIdleTimeBeforeScaleDown) + { + MaxNodeCount = maxNodeCount; + MinNodeCount = minNodeCount; + NodeIdleTimeBeforeScaleDown = nodeIdleTimeBeforeScaleDown; + } + + /// + /// Max number of nodes to use + /// Serialized Name: ScaleSettings.maxNodeCount + /// + public int MaxNodeCount { get; set; } + /// + /// Min number of nodes to use + /// Serialized Name: ScaleSettings.minNodeCount + /// + public int? MinNodeCount { get; set; } + /// + /// Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. + /// Serialized Name: ScaleSettings.nodeIdleTimeBeforeScaleDown + /// + public TimeSpan? NodeIdleTimeBeforeScaleDown { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlToken.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlToken.cs index 92a97536444f..211570fc8df3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlToken.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlToken.cs @@ -7,8 +7,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// AML Token identity configuration. - public partial class AmlToken : IdentityConfiguration + /// + /// AML Token identity configuration. + /// Serialized Name: AmlToken + /// + public partial class AmlToken : MachineLearningIdentityConfiguration { /// Initializes a new instance of AmlToken. public AmlToken() @@ -17,7 +20,10 @@ public AmlToken() } /// Initializes a new instance of AmlToken. - /// [Required] Specifies the type of identity framework. + /// + /// [Required] Specifies the type of identity framework. + /// Serialized Name: IdentityConfiguration.identityType + /// internal AmlToken(IdentityConfigurationType identityType) : base(identityType) { IdentityType = identityType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlUserFeature.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlUserFeature.Serialization.cs deleted file mode 100644 index 1476f4b3340e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlUserFeature.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AmlUserFeature - { - internal static AmlUserFeature DeserializeAmlUserFeature(JsonElement element) - { - Optional id = default; - Optional displayName = default; - Optional description = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName")) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - description = property.Value.GetString(); - continue; - } - } - return new AmlUserFeature(id.Value, displayName.Value, description.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlUserFeature.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlUserFeature.cs deleted file mode 100644 index dd4075078fc1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AmlUserFeature.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Features enabled for a workspace. - public partial class AmlUserFeature - { - /// Initializes a new instance of AmlUserFeature. - internal AmlUserFeature() - { - } - - /// Initializes a new instance of AmlUserFeature. - /// Specifies the feature ID. - /// Specifies the feature name. - /// Describes the feature for user experience. - internal AmlUserFeature(string id, string displayName, string description) - { - Id = id; - DisplayName = displayName; - Description = description; - } - - /// Specifies the feature ID. - public string Id { get; } - /// Specifies the feature name. - public string DisplayName { get; } - /// Describes the feature for user experience. - public string Description { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApplicationSharingPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApplicationSharingPolicy.cs deleted file mode 100644 index e5cb16baa43c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ApplicationSharingPolicy.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 -{ - /// 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 readonly partial struct ApplicationSharingPolicy : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ApplicationSharingPolicy(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PersonalValue = "Personal"; - private const string SharedValue = "Shared"; - - /// Personal. - public static ApplicationSharingPolicy Personal { get; } = new ApplicationSharingPolicy(PersonalValue); - /// Shared. - public static ApplicationSharingPolicy Shared { get; } = new ApplicationSharingPolicy(SharedValue); - /// Determines if two values are the same. - public static bool operator ==(ApplicationSharingPolicy left, ApplicationSharingPolicy right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ApplicationSharingPolicy left, ApplicationSharingPolicy right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ApplicationSharingPolicy(string value) => new ApplicationSharingPolicy(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ApplicationSharingPolicy other && Equals(other); - /// - public bool Equals(ApplicationSharingPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetBase.Serialization.cs deleted file mode 100644 index f590f33c489c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetBase.Serialization.cs +++ /dev/null @@ -1,167 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AssetBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static AssetBase DeserializeAssetBase(JsonElement element) - { - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new AssetBase(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetBase.cs deleted file mode 100644 index db4c0cd0417b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetBase.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The AssetBase. - public partial class AssetBase : ResourceBase - { - /// Initializes a new instance of AssetBase. - public AssetBase() - { - } - - /// Initializes a new instance of AssetBase. - /// 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?. - internal AssetBase(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived) : base(description, properties, tags) - { - IsAnonymous = isAnonymous; - IsArchived = isArchived; - } - - /// If the name version are system generated (anonymous registration). - public bool? IsAnonymous { get; set; } - /// Is the asset archived?. - public bool? IsArchived { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetContainer.Serialization.cs deleted file mode 100644 index cf9084574bfc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetContainer.Serialization.cs +++ /dev/null @@ -1,173 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AssetContainer : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static AssetContainer DeserializeAssetContainer(JsonElement element) - { - Optional isArchived = default; - Optional latestVersion = default; - Optional nextVersion = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("latestVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - latestVersion = null; - continue; - } - latestVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nextVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nextVersion = null; - continue; - } - nextVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new AssetContainer(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetContainer.cs deleted file mode 100644 index dd3401a93a5d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetContainer.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The AssetContainer. - public partial class AssetContainer : ResourceBase - { - /// Initializes a new instance of AssetContainer. - public AssetContainer() - { - } - - /// Initializes a new instance of AssetContainer. - /// 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. - internal AssetContainer(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags) - { - IsArchived = isArchived; - LatestVersion = latestVersion; - NextVersion = nextVersion; - } - - /// Is the asset archived?. - public bool? IsArchived { get; set; } - /// The latest version inside this container. - public string LatestVersion { get; } - /// The next auto incremental version. - public string NextVersion { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetReferenceBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetReferenceBase.Serialization.cs deleted file mode 100644 index a438118c08bd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetReferenceBase.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AssetReferenceBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("referenceType"); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WriteEndObject(); - } - - internal static AssetReferenceBase DeserializeAssetReferenceBase(JsonElement element) - { - if (element.TryGetProperty("referenceType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "DataPath": return DataPathAssetReference.DeserializeDataPathAssetReference(element); - case "Id": return IdAssetReference.DeserializeIdAssetReference(element); - case "OutputPath": return OutputPathAssetReference.DeserializeOutputPathAssetReference(element); - } - } - return UnknownAssetReferenceBase.DeserializeUnknownAssetReferenceBase(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetReferenceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetReferenceBase.cs deleted file mode 100644 index c65b5c966d5f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssetReferenceBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Base definition for asset references. - /// Please note is the base class. According to the scenario, a derived class 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 AssetReferenceBase - { - /// Initializes a new instance of AssetReferenceBase. - protected AssetReferenceBase() - { - } - - /// Initializes a new instance of AssetReferenceBase. - /// [Required] Specifies the type of asset reference. - internal AssetReferenceBase(ReferenceType referenceType) - { - ReferenceType = referenceType; - } - - /// [Required] Specifies the type of asset reference. - internal ReferenceType ReferenceType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssignedUser.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssignedUser.Serialization.cs deleted file mode 100644 index a64a201739e0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssignedUser.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AssignedUser : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("objectId"); - writer.WriteStringValue(ObjectId); - writer.WritePropertyName("tenantId"); - writer.WriteStringValue(TenantId); - writer.WriteEndObject(); - } - - internal static AssignedUser DeserializeAssignedUser(JsonElement element) - { - string objectId = default; - Guid tenantId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("objectId")) - { - objectId = property.Value.GetString(); - continue; - } - if (property.NameEquals("tenantId")) - { - tenantId = property.Value.GetGuid(); - continue; - } - } - return new AssignedUser(objectId, tenantId); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssignedUser.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssignedUser.cs deleted file mode 100644 index 866be7dfdc59..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AssignedUser.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// A user that can be assigned to a compute instance. - public partial class AssignedUser - { - /// Initializes a new instance of AssignedUser. - /// User’s AAD Object Id. - /// User’s AAD Tenant Id. - /// is null. - public AssignedUser(string objectId, Guid tenantId) - { - Argument.AssertNotNull(objectId, nameof(objectId)); - - ObjectId = objectId; - TenantId = tenantId; - } - - /// User’s AAD Object Id. - public string ObjectId { get; set; } - /// User’s AAD Tenant Id. - public Guid TenantId { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoForecastHorizon.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoForecastHorizon.cs index 80084e3d697a..e28d2ab1f041 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoForecastHorizon.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoForecastHorizon.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Forecast horizon determined automatically by system. + /// + /// Forecast horizon determined automatically by system. + /// Serialized Name: AutoForecastHorizon + /// public partial class AutoForecastHorizon : ForecastHorizon { /// Initializes a new instance of AutoForecastHorizon. @@ -17,7 +20,10 @@ public AutoForecastHorizon() } /// Initializes a new instance of AutoForecastHorizon. - /// [Required] Set forecast horizon value selection mode. + /// + /// [Required] Set forecast horizon value selection mode. + /// Serialized Name: ForecastHorizon.mode + /// internal AutoForecastHorizon(ForecastHorizonMode mode) : base(mode) { Mode = mode; 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 0df409b3bde4..bb3b2ac4a9d0 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 @@ -204,18 +204,18 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) { Optional environmentId = default; Optional> environmentVariables = default; - Optional> outputs = default; - Optional resources = default; + Optional> outputs = default; + Optional resources = default; AutoMLVertical taskDetails = default; Optional componentId = default; Optional computeId = default; Optional displayName = default; Optional experimentName = default; - Optional identity = default; + Optional identity = default; Optional isArchived = default; JobType jobType = default; - Optional> services = default; - Optional status = default; + Optional> services = default; + Optional status = default; Optional description = default; Optional> properties = default; Optional> tags = default; @@ -260,7 +260,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) outputs = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -269,7 +269,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) } else { - dictionary.Add(property0.Name, JobOutput.DeserializeJobOutput(property0.Value)); + dictionary.Add(property0.Name, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value)); } } outputs = dictionary; @@ -282,7 +282,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - resources = JobResourceConfiguration.DeserializeJobResourceConfiguration(property.Value); + resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value); continue; } if (property.NameEquals("taskDetails")) @@ -332,7 +332,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) identity = null; continue; } - identity = IdentityConfiguration.DeserializeIdentityConfiguration(property.Value); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); continue; } if (property.NameEquals("isArchived")) @@ -357,7 +357,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) services = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -366,7 +366,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) } else { - dictionary.Add(property0.Name, JobService.DeserializeJobService(property0.Value)); + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); } } services = dictionary; @@ -379,7 +379,7 @@ internal static AutoMLJob DeserializeAutoMLJob(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - status = new JobStatus(property.Value.GetString()); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } if (property.NameEquals("description")) 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 92f3705025f6..095c5ebca7a3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLJob.cs @@ -15,14 +15,16 @@ namespace Azure.ResourceManager.MachineLearning.Models /// AutoMLJob class. /// Use this class for executing AutoML tasks like Classification/Regression etc. /// See TaskType enum for all the tasks supported. + /// Serialized Name: AutoMLJob /// public partial class AutoMLJob : MachineLearningJobProperties { /// Initializes a new instance of AutoMLJob. /// /// [Required] This represents scenario which can be one of Tables/NLP/Image + /// Serialized Name: AutoMLJob.taskDetails /// Please note is the base class. According to the scenario, a derived class 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 AutoMLJob(AutoMLVertical taskDetails) @@ -30,49 +32,90 @@ public AutoMLJob(AutoMLVertical taskDetails) Argument.AssertNotNull(taskDetails, nameof(taskDetails)); EnvironmentVariables = new ChangeTrackingDictionary(); - Outputs = new ChangeTrackingDictionary(); + Outputs = new ChangeTrackingDictionary(); TaskDetails = taskDetails; JobType = JobType.AutoML; } /// Initializes a new instance of AutoMLJob. - /// 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. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// ARM resource ID of the component resource. + /// Serialized Name: JobBase.componentId + /// + /// + /// ARM resource ID of the compute resource. + /// Serialized Name: JobBase.computeId + /// + /// + /// Display name of job. + /// Serialized Name: JobBase.displayName + /// + /// + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Serialized Name: JobBase.experimentName + /// /// /// 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 . + /// Serialized Name: JobBase.identity + /// Please note is the base class. According to the scenario, a derived class 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? + /// Serialized Name: JobBase.isArchived + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobBase.jobType /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// Serialized Name: JobBase.services + /// + /// + /// Status of the job. + /// Serialized Name: JobBase.status /// - /// 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. + /// Serialized Name: AutoMLJob.environmentId + /// + /// + /// Environment variables included in the job. + /// Serialized Name: AutoMLJob.environmentVariables /// - /// 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 . + /// Serialized Name: AutoMLJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: AutoMLJob.resources /// - /// Compute Resource configuration for the job. /// /// [Required] This represents scenario which can be one of Tables/NLP/Image + /// Serialized Name: AutoMLJob.taskDetails /// Please note is the base class. According to the scenario, a derived class 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 AutoMLJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, IdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, JobStatus? status, string environmentId, IDictionary environmentVariables, IDictionary outputs, JobResourceConfiguration resources, AutoMLVertical taskDetails) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + internal AutoMLJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, string environmentId, IDictionary environmentVariables, IDictionary outputs, MachineLearningJobResourceConfiguration resources, AutoMLVertical taskDetails) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) { EnvironmentId = environmentId; EnvironmentVariables = environmentVariables; @@ -85,22 +128,31 @@ internal AutoMLJob(string description, IDictionary properties, I /// /// 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. + /// Serialized Name: AutoMLJob.environmentId /// public string EnvironmentId { get; set; } - /// Environment variables included in the job. + /// + /// Environment variables included in the job. + /// Serialized Name: AutoMLJob.environmentVariables + /// public IDictionary EnvironmentVariables { 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 . + /// Serialized Name: AutoMLJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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; } + /// + /// Compute Resource configuration for the job. + /// Serialized Name: AutoMLJob.resources /// - public IDictionary Outputs { get; set; } - /// Compute Resource configuration for the job. - public JobResourceConfiguration Resources { get; set; } + public MachineLearningJobResourceConfiguration Resources { get; set; } /// /// [Required] This represents scenario which can be one of Tables/NLP/Image + /// Serialized Name: AutoMLJob.taskDetails /// Please note is the base class. According to the scenario, a derived class 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 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 c685520e483f..d3e835716efe 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 @@ -45,13 +45,13 @@ internal static AutoMLVertical DeserializeAutoMLVertical(JsonElement element) { switch (discriminator.GetString()) { - case "Classification": return Classification.DeserializeClassification(element); + case "Classification": return ClassificationTask.DeserializeClassificationTask(element); case "Forecasting": return Forecasting.DeserializeForecasting(element); case "ImageClassification": return ImageClassification.DeserializeImageClassification(element); case "ImageClassificationMultilabel": return ImageClassificationMultilabel.DeserializeImageClassificationMultilabel(element); case "ImageInstanceSegmentation": return ImageInstanceSegmentation.DeserializeImageInstanceSegmentation(element); case "ImageObjectDetection": return ImageObjectDetection.DeserializeImageObjectDetection(element); - case "Regression": return Regression.DeserializeRegression(element); + case "Regression": return AutoMLVerticalRegression.DeserializeAutoMLVerticalRegression(element); case "TextClassification": return TextClassification.DeserializeTextClassification(element); case "TextClassificationMultilabel": return TextClassificationMultilabel.DeserializeTextClassificationMultilabel(element); case "TextNER": return TextNer.DeserializeTextNer(element); 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 32d707bdeb1d..d6a447ce7ffc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVertical.cs @@ -13,15 +13,19 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// AutoML vertical class. /// Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical + /// Serialized Name: AutoMLVertical /// Please note is the base class. According to the scenario, a derived class 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 abstract partial class AutoMLVertical { /// Initializes a new instance of AutoMLVertical. - /// [Required] Training data input. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// /// is null. - protected AutoMLVertical(MLTableJobInput trainingData) + protected AutoMLVertical(MachineLearningTableJobInput trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); @@ -29,14 +33,24 @@ protected AutoMLVertical(MLTableJobInput trainingData) } /// Initializes a new instance of AutoMLVertical. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - internal AutoMLVertical(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData) + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + internal AutoMLVertical(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData) { LogVerbosity = logVerbosity; TargetColumnName = targetColumnName; @@ -44,16 +58,26 @@ internal AutoMLVertical(LogVerbosity? logVerbosity, string targetColumnName, Tas TrainingData = trainingData; } - /// Log verbosity for the job. - public LogVerbosity? LogVerbosity { get; set; } + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// + public MachineLearningLogVerbosity? LogVerbosity { get; set; } /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName /// public string TargetColumnName { get; set; } - /// [Required] Task type for AutoMLJob. + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// internal TaskType TaskType { get; set; } - /// [Required] Training data input. - public MLTableJobInput TrainingData { get; set; } + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + 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 new file mode 100644 index 000000000000..332b49ed5b4b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.Serialization.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class AutoMLVerticalRegression : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PrimaryMetric)) + { + writer.WritePropertyName("primaryMetric"); + writer.WriteStringValue(PrimaryMetric.Value.ToString()); + } + if (Optional.IsDefined(TrainingSettings)) + { + if (TrainingSettings != null) + { + writer.WritePropertyName("trainingSettings"); + writer.WriteObjectValue(TrainingSettings); + } + else + { + writer.WriteNull("trainingSettings"); + } + } + if (Optional.IsCollectionDefined(CvSplitColumnNames)) + { + if (CvSplitColumnNames != null) + { + writer.WritePropertyName("cvSplitColumnNames"); + 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"); + writer.WriteObjectValue(FeaturizationSettings); + } + else + { + writer.WriteNull("featurizationSettings"); + } + } + if (Optional.IsDefined(LimitSettings)) + { + if (LimitSettings != null) + { + writer.WritePropertyName("limitSettings"); + writer.WriteObjectValue(LimitSettings); + } + else + { + writer.WriteNull("limitSettings"); + } + } + if (Optional.IsDefined(NCrossValidations)) + { + if (NCrossValidations != null) + { + writer.WritePropertyName("nCrossValidations"); + writer.WriteObjectValue(NCrossValidations); + } + else + { + writer.WriteNull("nCrossValidations"); + } + } + if (Optional.IsDefined(TestData)) + { + if (TestData != null) + { + writer.WritePropertyName("testData"); + writer.WriteObjectValue(TestData); + } + else + { + writer.WriteNull("testData"); + } + } + if (Optional.IsDefined(TestDataSize)) + { + if (TestDataSize != null) + { + writer.WritePropertyName("testDataSize"); + writer.WriteNumberValue(TestDataSize.Value); + } + else + { + writer.WriteNull("testDataSize"); + } + } + if (Optional.IsDefined(ValidationData)) + { + if (ValidationData != null) + { + writer.WritePropertyName("validationData"); + writer.WriteObjectValue(ValidationData); + } + else + { + writer.WriteNull("validationData"); + } + } + if (Optional.IsDefined(ValidationDataSize)) + { + if (ValidationDataSize != null) + { + writer.WritePropertyName("validationDataSize"); + writer.WriteNumberValue(ValidationDataSize.Value); + } + else + { + writer.WriteNull("validationDataSize"); + } + } + if (Optional.IsDefined(WeightColumnName)) + { + if (WeightColumnName != null) + { + writer.WritePropertyName("weightColumnName"); + writer.WriteStringValue(WeightColumnName); + } + else + { + writer.WriteNull("weightColumnName"); + } + } + if (Optional.IsDefined(LogVerbosity)) + { + writer.WritePropertyName("logVerbosity"); + writer.WriteStringValue(LogVerbosity.Value.ToString()); + } + if (Optional.IsDefined(TargetColumnName)) + { + if (TargetColumnName != null) + { + writer.WritePropertyName("targetColumnName"); + writer.WriteStringValue(TargetColumnName); + } + else + { + writer.WriteNull("targetColumnName"); + } + } + writer.WritePropertyName("taskType"); + writer.WriteStringValue(TaskType.ToString()); + writer.WritePropertyName("trainingData"); + writer.WriteObjectValue(TrainingData); + writer.WriteEndObject(); + } + + internal static AutoMLVerticalRegression DeserializeAutoMLVerticalRegression(JsonElement element) + { + Optional primaryMetric = default; + Optional trainingSettings = default; + Optional> cvSplitColumnNames = default; + Optional featurizationSettings = default; + Optional limitSettings = default; + Optional nCrossValidations = default; + Optional testData = default; + Optional testDataSize = default; + Optional validationData = default; + Optional validationDataSize = default; + Optional weightColumnName = default; + Optional logVerbosity = default; + Optional targetColumnName = default; + TaskType taskType = default; + MachineLearningTableJobInput trainingData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("primaryMetric")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + primaryMetric = new AutoMLVerticalRegressionPrimaryMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + trainingSettings = null; + continue; + } + trainingSettings = RegressionTrainingSettings.DeserializeRegressionTrainingSettings(property.Value); + continue; + } + if (property.NameEquals("cvSplitColumnNames")) + { + 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")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featurizationSettings = null; + continue; + } + featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); + continue; + } + if (property.NameEquals("limitSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + limitSettings = null; + continue; + } + limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value); + continue; + } + if (property.NameEquals("nCrossValidations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nCrossValidations = null; + continue; + } + nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); + continue; + } + if (property.NameEquals("testData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + testData = null; + continue; + } + testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); + continue; + } + if (property.NameEquals("testDataSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + testDataSize = null; + continue; + } + testDataSize = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("validationData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + validationData = null; + continue; + } + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); + continue; + } + if (property.NameEquals("validationDataSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + validationDataSize = null; + continue; + } + validationDataSize = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("weightColumnName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + weightColumnName = null; + continue; + } + weightColumnName = property.Value.GetString(); + continue; + } + if (property.NameEquals("logVerbosity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetColumnName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + targetColumnName = null; + continue; + } + targetColumnName = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskType")) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingData")) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); + continue; + } + } + return new AutoMLVerticalRegression(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs new file mode 100644 index 000000000000..aa37fd49fccf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegression.cs @@ -0,0 +1,182 @@ +// 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 +{ + /// + /// Regression task in AutoML Table vertical. + /// Serialized Name: Regression + /// + public partial class AutoMLVerticalRegression : AutoMLVertical + { + /// Initializes a new instance of AutoMLVerticalRegression. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// is null. + public AutoMLVerticalRegression(MachineLearningTableJobInput trainingData) : base(trainingData) + { + Argument.AssertNotNull(trainingData, nameof(trainingData)); + + CvSplitColumnNames = new ChangeTrackingList(); + TaskType = TaskType.Regression; + } + + /// Initializes a new instance of AutoMLVerticalRegression. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// + /// + /// Target column name: This is prediction values column. + /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Primary metric for regression task. + /// Serialized Name: Regression.primaryMetric + /// + /// + /// Inputs for training phase for an AutoML Job. + /// Serialized Name: Regression.trainingSettings + /// + /// + /// Columns to use for CVSplit data. + /// Serialized Name: TableVertical.cvSplitColumnNames + /// + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: TableVertical.featurizationSettings + /// + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: TableVertical.limitSettings + /// + /// + /// Number of cross validation folds to be applied on training dataset + /// when validation dataset is not provided. + /// Serialized Name: TableVertical.nCrossValidations + /// Please note is the base class. According to the scenario, a derived class 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 . + /// + /// + /// Test data input. + /// Serialized Name: TableVertical.testData + /// + /// + /// 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. + /// Serialized Name: TableVertical.testDataSize + /// + /// + /// Validation data inputs. + /// Serialized Name: TableVertical.validationData + /// + /// + /// 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. + /// Serialized Name: TableVertical.validationDataSize + /// + /// + /// 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. + /// Serialized Name: TableVertical.weightColumnName + /// + internal AutoMLVerticalRegression(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, 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) + { + PrimaryMetric = primaryMetric; + TrainingSettings = trainingSettings; + CvSplitColumnNames = cvSplitColumnNames; + FeaturizationSettings = featurizationSettings; + LimitSettings = limitSettings; + NCrossValidations = nCrossValidations; + TestData = testData; + TestDataSize = testDataSize; + ValidationData = validationData; + ValidationDataSize = validationDataSize; + WeightColumnName = weightColumnName; + TaskType = taskType; + } + + /// + /// Primary metric for regression task. + /// Serialized Name: Regression.primaryMetric + /// + public AutoMLVerticalRegressionPrimaryMetric? PrimaryMetric { get; set; } + /// + /// Inputs for training phase for an AutoML Job. + /// Serialized Name: Regression.trainingSettings + /// + public RegressionTrainingSettings TrainingSettings { get; set; } + /// + /// Columns to use for CVSplit data. + /// Serialized Name: TableVertical.cvSplitColumnNames + /// + public IList CvSplitColumnNames { get; set; } + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: TableVertical.featurizationSettings + /// + public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: TableVertical.limitSettings + /// + public TableVerticalLimitSettings LimitSettings { get; set; } + /// + /// Number of cross validation folds to be applied on training dataset + /// when validation dataset is not provided. + /// Serialized Name: TableVertical.nCrossValidations + /// Please note is the base class. According to the scenario, a derived class 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 NCrossValidations NCrossValidations { get; set; } + /// + /// Test data input. + /// Serialized Name: TableVertical.testData + /// + public MachineLearningTableJobInput TestData { get; set; } + /// + /// 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. + /// Serialized Name: TableVertical.testDataSize + /// + public double? TestDataSize { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: TableVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } + /// + /// 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. + /// Serialized Name: TableVertical.validationDataSize + /// + 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. + /// Serialized Name: TableVertical.weightColumnName + /// + public string WeightColumnName { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs new file mode 100644 index 000000000000..075503aaee91 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionModel.cs @@ -0,0 +1,114 @@ +// 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 for all Regression models supported by AutoML. + /// Serialized Name: RegressionModels + /// + public readonly partial struct AutoMLVerticalRegressionModel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoMLVerticalRegressionModel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ElasticNetValue = "ElasticNet"; + private const string GradientBoostingValue = "GradientBoosting"; + private const string DecisionTreeValue = "DecisionTree"; + private const string KNNValue = "KNN"; + private const string LassoLarsValue = "LassoLars"; + private const string SGDValue = "SGD"; + private const string RandomForestValue = "RandomForest"; + private const string ExtremeRandomTreesValue = "ExtremeRandomTrees"; + private const string LightGBMValue = "LightGBM"; + private const string XGBoostRegressorValue = "XGBoostRegressor"; + + /// + /// Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. + /// Serialized Name: RegressionModels.ElasticNet + /// + public static AutoMLVerticalRegressionModel ElasticNet { get; } = new AutoMLVerticalRegressionModel(ElasticNetValue); + /// + /// The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + /// Serialized Name: RegressionModels.GradientBoosting + /// + public static AutoMLVerticalRegressionModel GradientBoosting { get; } = new AutoMLVerticalRegressionModel(GradientBoostingValue); + /// + /// Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. + /// The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. + /// Serialized Name: RegressionModels.DecisionTree + /// + public static AutoMLVerticalRegressionModel DecisionTree { get; } = new AutoMLVerticalRegressionModel(DecisionTreeValue); + /// + /// K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints + /// which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. + /// Serialized Name: RegressionModels.KNN + /// + public static AutoMLVerticalRegressionModel KNN { get; } = new AutoMLVerticalRegressionModel(KNNValue); + /// + /// Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. + /// Serialized Name: RegressionModels.LassoLars + /// + public static AutoMLVerticalRegressionModel LassoLars { get; } = new AutoMLVerticalRegressionModel(LassoLarsValue); + /// + /// SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications + /// to find the model parameters that correspond to the best fit between predicted and actual outputs. + /// It's an inexact but powerful technique. + /// Serialized Name: RegressionModels.SGD + /// + public static AutoMLVerticalRegressionModel SGD { get; } = new AutoMLVerticalRegressionModel(SGDValue); + /// + /// Random forest is a supervised learning algorithm. + /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. + /// The general idea of the bagging method is that a combination of learning models increases the overall result. + /// Serialized Name: RegressionModels.RandomForest + /// + public static AutoMLVerticalRegressionModel RandomForest { get; } = new AutoMLVerticalRegressionModel(RandomForestValue); + /// + /// Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + /// Serialized Name: RegressionModels.ExtremeRandomTrees + /// + public static AutoMLVerticalRegressionModel ExtremeRandomTrees { get; } = new AutoMLVerticalRegressionModel(ExtremeRandomTreesValue); + /// + /// LightGBM is a gradient boosting framework that uses tree based learning algorithms. + /// Serialized Name: RegressionModels.LightGBM + /// + public static AutoMLVerticalRegressionModel LightGBM { get; } = new AutoMLVerticalRegressionModel(LightGBMValue); + /// + /// XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. + /// Serialized Name: RegressionModels.XGBoostRegressor + /// + public static AutoMLVerticalRegressionModel XGBoostRegressor { get; } = new AutoMLVerticalRegressionModel(XGBoostRegressorValue); + /// Determines if two values are the same. + public static bool operator ==(AutoMLVerticalRegressionModel left, AutoMLVerticalRegressionModel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoMLVerticalRegressionModel left, AutoMLVerticalRegressionModel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AutoMLVerticalRegressionModel(string value) => new AutoMLVerticalRegressionModel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoMLVerticalRegressionModel other && Equals(other); + /// + public bool Equals(AutoMLVerticalRegressionModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionPrimaryMetric.cs new file mode 100644 index 000000000000..43d15a862de4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoMLVerticalRegressionPrimaryMetric.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Primary metrics for Regression task. + /// Serialized Name: RegressionPrimaryMetrics + /// + public readonly partial struct AutoMLVerticalRegressionPrimaryMetric : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutoMLVerticalRegressionPrimaryMetric(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SpearmanCorrelationValue = "SpearmanCorrelation"; + private const string NormalizedRootMeanSquaredErrorValue = "NormalizedRootMeanSquaredError"; + private const string R2ScoreValue = "R2Score"; + private const string NormalizedMeanAbsoluteErrorValue = "NormalizedMeanAbsoluteError"; + + /// + /// The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation. + /// Serialized Name: RegressionPrimaryMetrics.SpearmanCorrelation + /// + public static AutoMLVerticalRegressionPrimaryMetric SpearmanCorrelation { get; } = new AutoMLVerticalRegressionPrimaryMetric(SpearmanCorrelationValue); + /// + /// The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. + /// Serialized Name: RegressionPrimaryMetrics.NormalizedRootMeanSquaredError + /// + public static AutoMLVerticalRegressionPrimaryMetric NormalizedRootMeanSquaredError { get; } = new AutoMLVerticalRegressionPrimaryMetric(NormalizedRootMeanSquaredErrorValue); + /// + /// The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. + /// Serialized Name: RegressionPrimaryMetrics.R2Score + /// + public static AutoMLVerticalRegressionPrimaryMetric R2Score { get; } = new AutoMLVerticalRegressionPrimaryMetric(R2ScoreValue); + /// + /// The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. + /// Serialized Name: RegressionPrimaryMetrics.NormalizedMeanAbsoluteError + /// + public static AutoMLVerticalRegressionPrimaryMetric NormalizedMeanAbsoluteError { get; } = new AutoMLVerticalRegressionPrimaryMetric(NormalizedMeanAbsoluteErrorValue); + /// Determines if two values are the same. + public static bool operator ==(AutoMLVerticalRegressionPrimaryMetric left, AutoMLVerticalRegressionPrimaryMetric right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutoMLVerticalRegressionPrimaryMetric left, AutoMLVerticalRegressionPrimaryMetric right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AutoMLVerticalRegressionPrimaryMetric(string value) => new AutoMLVerticalRegressionPrimaryMetric(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutoMLVerticalRegressionPrimaryMetric other && Equals(other); + /// + public bool Equals(AutoMLVerticalRegressionPrimaryMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoNCrossValidations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoNCrossValidations.cs index 553bb016a465..37c217f6ffe8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoNCrossValidations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoNCrossValidations.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// N-Cross validations determined automatically. + /// + /// N-Cross validations determined automatically. + /// Serialized Name: AutoNCrossValidations + /// public partial class AutoNCrossValidations : NCrossValidations { /// Initializes a new instance of AutoNCrossValidations. @@ -17,7 +20,10 @@ public AutoNCrossValidations() } /// Initializes a new instance of AutoNCrossValidations. - /// [Required] Mode for determining N-Cross validations. + /// + /// [Required] Mode for determining N-Cross validations. + /// Serialized Name: NCrossValidations.mode + /// internal AutoNCrossValidations(NCrossValidationsMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoPauseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoPauseProperties.Serialization.cs deleted file mode 100644 index 8c9f045f4b5f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoPauseProperties.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AutoPauseProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DelayInMinutes)) - { - writer.WritePropertyName("delayInMinutes"); - writer.WriteNumberValue(DelayInMinutes.Value); - } - if (Optional.IsDefined(Enabled)) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(Enabled.Value); - } - writer.WriteEndObject(); - } - - internal static AutoPauseProperties DeserializeAutoPauseProperties(JsonElement element) - { - Optional delayInMinutes = default; - Optional enabled = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("delayInMinutes")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - delayInMinutes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("enabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enabled = property.Value.GetBoolean(); - continue; - } - } - return new AutoPauseProperties(Optional.ToNullable(delayInMinutes), Optional.ToNullable(enabled)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoPauseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoPauseProperties.cs deleted file mode 100644 index f130b0912d82..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoPauseProperties.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Auto pause properties. - public partial class AutoPauseProperties - { - /// Initializes a new instance of AutoPauseProperties. - public AutoPauseProperties() - { - } - - /// Initializes a new instance of AutoPauseProperties. - /// - /// - internal AutoPauseProperties(int? delayInMinutes, bool? enabled) - { - DelayInMinutes = delayInMinutes; - Enabled = enabled; - } - - /// Gets or sets the delay in minutes. - public int? DelayInMinutes { get; set; } - /// Gets or sets the enabled. - public bool? Enabled { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoRebuildSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoRebuildSetting.cs index cc7d135ce4a0..5b2fa1910898 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoRebuildSetting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoRebuildSetting.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// AutoRebuild setting for the derived image. + /// + /// AutoRebuild setting for the derived image + /// Serialized Name: AutoRebuildSetting + /// public readonly partial struct AutoRebuildSetting : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public AutoRebuildSetting(string value) private const string DisabledValue = "Disabled"; private const string OnBaseImageUpdateValue = "OnBaseImageUpdate"; - /// Disabled. + /// + /// Disabled + /// Serialized Name: AutoRebuildSetting.Disabled + /// public static AutoRebuildSetting Disabled { get; } = new AutoRebuildSetting(DisabledValue); - /// OnBaseImageUpdate. + /// + /// OnBaseImageUpdate + /// Serialized Name: AutoRebuildSetting.OnBaseImageUpdate + /// public static AutoRebuildSetting OnBaseImageUpdate { get; } = new AutoRebuildSetting(OnBaseImageUpdateValue); /// Determines if two values are the same. public static bool operator ==(AutoRebuildSetting left, AutoRebuildSetting right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoScaleProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoScaleProperties.Serialization.cs deleted file mode 100644 index a94fa9ded08d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoScaleProperties.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AutoScaleProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MinNodeCount)) - { - writer.WritePropertyName("minNodeCount"); - writer.WriteNumberValue(MinNodeCount.Value); - } - if (Optional.IsDefined(Enabled)) - { - writer.WritePropertyName("enabled"); - writer.WriteBooleanValue(Enabled.Value); - } - if (Optional.IsDefined(MaxNodeCount)) - { - writer.WritePropertyName("maxNodeCount"); - writer.WriteNumberValue(MaxNodeCount.Value); - } - writer.WriteEndObject(); - } - - internal static AutoScaleProperties DeserializeAutoScaleProperties(JsonElement element) - { - Optional minNodeCount = default; - Optional enabled = default; - Optional maxNodeCount = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("minNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("enabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("maxNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxNodeCount = property.Value.GetInt32(); - continue; - } - } - return new AutoScaleProperties(Optional.ToNullable(minNodeCount), Optional.ToNullable(enabled), Optional.ToNullable(maxNodeCount)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoScaleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoScaleProperties.cs deleted file mode 100644 index 76e22fc5a660..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoScaleProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Auto scale properties. - public partial class AutoScaleProperties - { - /// Initializes a new instance of AutoScaleProperties. - public AutoScaleProperties() - { - } - - /// Initializes a new instance of AutoScaleProperties. - /// - /// - /// - internal AutoScaleProperties(int? minNodeCount, bool? enabled, int? maxNodeCount) - { - MinNodeCount = minNodeCount; - Enabled = enabled; - MaxNodeCount = maxNodeCount; - } - - /// Gets or sets the min node count. - public int? MinNodeCount { get; set; } - /// Gets or sets the enabled. - public bool? Enabled { get; set; } - /// Gets or sets the max node count. - public int? MaxNodeCount { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoSeasonality.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoSeasonality.cs index 75fa37584ce6..6fbd641af9ae 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoSeasonality.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoSeasonality.cs @@ -7,8 +7,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The AutoSeasonality. - public partial class AutoSeasonality : Seasonality + /// + /// The AutoSeasonality. + /// Serialized Name: AutoSeasonality + /// + public partial class AutoSeasonality : ForecastingSeasonality { /// Initializes a new instance of AutoSeasonality. public AutoSeasonality() @@ -17,7 +20,10 @@ public AutoSeasonality() } /// Initializes a new instance of AutoSeasonality. - /// [Required] Seasonality mode. + /// + /// [Required] Seasonality mode. + /// Serialized Name: Seasonality.mode + /// internal AutoSeasonality(SeasonalityMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetLags.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetLags.cs index bb0220af0188..4ec41d09d38f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetLags.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetLags.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The AutoTargetLags. + /// + /// The AutoTargetLags. + /// Serialized Name: AutoTargetLags + /// public partial class AutoTargetLags : TargetLags { /// Initializes a new instance of AutoTargetLags. @@ -17,7 +20,10 @@ public AutoTargetLags() } /// Initializes a new instance of AutoTargetLags. - /// [Required] Set target lags mode - Auto/Custom. + /// + /// [Required] Set target lags mode - Auto/Custom + /// Serialized Name: TargetLags.mode + /// internal AutoTargetLags(TargetLagsMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetRollingWindowSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetRollingWindowSize.cs index e29678428264..4b14350070e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetRollingWindowSize.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AutoTargetRollingWindowSize.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Target lags rolling window determined automatically. + /// + /// Target lags rolling window determined automatically. + /// Serialized Name: AutoTargetRollingWindowSize + /// public partial class AutoTargetRollingWindowSize : TargetRollingWindowSize { /// Initializes a new instance of AutoTargetRollingWindowSize. @@ -17,7 +20,10 @@ public AutoTargetRollingWindowSize() } /// Initializes a new instance of AutoTargetRollingWindowSize. - /// [Required] TargetRollingWindowSiz detection mode. + /// + /// [Required] TargetRollingWindowSiz detection mode. + /// Serialized Name: TargetRollingWindowSize.mode + /// internal AutoTargetRollingWindowSize(TargetRollingWindowSizeMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Autosave.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Autosave.cs deleted file mode 100644 index 3ae83bf56711..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Autosave.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 -{ - /// Auto save settings. - public readonly partial struct Autosave : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Autosave(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string LocalValue = "Local"; - private const string RemoteValue = "Remote"; - - /// None. - public static Autosave None { get; } = new Autosave(NoneValue); - /// Local. - public static Autosave Local { get; } = new Autosave(LocalValue); - /// Remote. - public static Autosave Remote { get; } = new Autosave(RemoteValue); - /// Determines if two values are the same. - public static bool operator ==(Autosave left, Autosave right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Autosave left, Autosave right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Autosave(string value) => new Autosave(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Autosave other && Equals(other); - /// - public bool Equals(Autosave other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureBlobDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureBlobDatastore.Serialization.cs deleted file mode 100644 index 5f56eb2025d8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureBlobDatastore.Serialization.cs +++ /dev/null @@ -1,270 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AzureBlobDatastore : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AccountName)) - { - if (AccountName != null) - { - writer.WritePropertyName("accountName"); - writer.WriteStringValue(AccountName); - } - else - { - writer.WriteNull("accountName"); - } - } - if (Optional.IsDefined(ContainerName)) - { - if (ContainerName != null) - { - writer.WritePropertyName("containerName"); - writer.WriteStringValue(ContainerName); - } - else - { - writer.WriteNull("containerName"); - } - } - if (Optional.IsDefined(Endpoint)) - { - if (Endpoint != null) - { - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - } - else - { - writer.WriteNull("endpoint"); - } - } - if (Optional.IsDefined(Protocol)) - { - if (Protocol != null) - { - writer.WritePropertyName("protocol"); - writer.WriteStringValue(Protocol); - } - else - { - writer.WriteNull("protocol"); - } - } - if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) - { - writer.WritePropertyName("serviceDataAccessAuthIdentity"); - writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); - } - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("datastoreType"); - writer.WriteStringValue(DatastoreType.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static AzureBlobDatastore DeserializeAzureBlobDatastore(JsonElement element) - { - Optional accountName = default; - Optional containerName = default; - Optional endpoint = default; - Optional protocol = default; - Optional serviceDataAccessAuthIdentity = default; - DatastoreCredentials credentials = default; - DatastoreType datastoreType = default; - Optional isDefault = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accountName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - accountName = null; - continue; - } - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("containerName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - containerName = null; - continue; - } - containerName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoint")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - endpoint = null; - continue; - } - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("protocol")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - protocol = null; - continue; - } - protocol = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceDataAccessAuthIdentity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - serviceDataAccessAuthIdentity = new ServiceDataAccessAuthIdentity(property.Value.GetString()); - continue; - } - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("datastoreType")) - { - datastoreType = new DatastoreType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new AzureBlobDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName.Value, containerName.Value, endpoint.Value, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureBlobDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureBlobDatastore.cs deleted file mode 100644 index ec267a224a9b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureBlobDatastore.cs +++ /dev/null @@ -1,68 +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 -{ - /// Azure Blob datastore configuration. - public partial class AzureBlobDatastore : DatastoreProperties - { - /// Initializes a new instance of AzureBlobDatastore. - /// - /// [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 . - /// - /// is null. - public AzureBlobDatastore(DatastoreCredentials credentials) : base(credentials) - { - Argument.AssertNotNull(credentials, nameof(credentials)); - - DatastoreType = DatastoreType.AzureBlob; - } - - /// Initializes a new instance of AzureBlobDatastore. - /// 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 . - /// - /// [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. - internal AzureBlobDatastore(string description, IDictionary properties, IDictionary tags, DatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string containerName, string endpoint, string protocol, ServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) - { - AccountName = accountName; - ContainerName = containerName; - Endpoint = endpoint; - Protocol = protocol; - ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - DatastoreType = datastoreType; - } - - /// Storage account name. - public string AccountName { get; set; } - /// Storage account container name. - public string ContainerName { 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 ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen1Datastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen1Datastore.Serialization.cs deleted file mode 100644 index 12007deb5d25..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen1Datastore.Serialization.cs +++ /dev/null @@ -1,186 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AzureDataLakeGen1Datastore : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) - { - writer.WritePropertyName("serviceDataAccessAuthIdentity"); - writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); - } - writer.WritePropertyName("storeName"); - writer.WriteStringValue(StoreName); - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("datastoreType"); - writer.WriteStringValue(DatastoreType.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeGen1Datastore DeserializeAzureDataLakeGen1Datastore(JsonElement element) - { - Optional serviceDataAccessAuthIdentity = default; - string storeName = default; - DatastoreCredentials credentials = default; - DatastoreType datastoreType = default; - Optional isDefault = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("serviceDataAccessAuthIdentity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - serviceDataAccessAuthIdentity = new ServiceDataAccessAuthIdentity(property.Value.GetString()); - continue; - } - if (property.NameEquals("storeName")) - { - storeName = property.Value.GetString(); - continue; - } - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("datastoreType")) - { - datastoreType = new DatastoreType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new AzureDataLakeGen1Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), Optional.ToNullable(serviceDataAccessAuthIdentity), storeName); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen1Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen1Datastore.cs deleted file mode 100644 index 9f02cf654f5e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen1Datastore.cs +++ /dev/null @@ -1,59 +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 -{ - /// Azure Data Lake Gen1 datastore configuration. - public partial class AzureDataLakeGen1Datastore : DatastoreProperties - { - /// Initializes a new instance of AzureDataLakeGen1Datastore. - /// - /// [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] Azure Data Lake store name. - /// or is null. - public AzureDataLakeGen1Datastore(DatastoreCredentials credentials, string storeName) : base(credentials) - { - Argument.AssertNotNull(credentials, nameof(credentials)); - Argument.AssertNotNull(storeName, nameof(storeName)); - - StoreName = storeName; - DatastoreType = DatastoreType.AzureDataLakeGen1; - } - - /// Initializes a new instance of AzureDataLakeGen1Datastore. - /// 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 . - /// - /// [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. - internal AzureDataLakeGen1Datastore(string description, IDictionary properties, IDictionary tags, DatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, ServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string storeName) : base(description, properties, tags, credentials, datastoreType, isDefault) - { - ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - StoreName = storeName; - DatastoreType = datastoreType; - } - - /// Indicates which identity to use to authenticate service data access to customer's storage. - public ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - /// [Required] Azure Data Lake store name. - public string StoreName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen2Datastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen2Datastore.Serialization.cs deleted file mode 100644 index 97da463ec774..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen2Datastore.Serialization.cs +++ /dev/null @@ -1,240 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AzureDataLakeGen2Datastore : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("accountName"); - writer.WriteStringValue(AccountName); - if (Optional.IsDefined(Endpoint)) - { - if (Endpoint != null) - { - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - } - else - { - writer.WriteNull("endpoint"); - } - } - writer.WritePropertyName("filesystem"); - writer.WriteStringValue(Filesystem); - if (Optional.IsDefined(Protocol)) - { - if (Protocol != null) - { - writer.WritePropertyName("protocol"); - writer.WriteStringValue(Protocol); - } - else - { - writer.WriteNull("protocol"); - } - } - if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) - { - writer.WritePropertyName("serviceDataAccessAuthIdentity"); - writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); - } - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("datastoreType"); - writer.WriteStringValue(DatastoreType.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static AzureDataLakeGen2Datastore DeserializeAzureDataLakeGen2Datastore(JsonElement element) - { - string accountName = default; - Optional endpoint = default; - string filesystem = default; - Optional protocol = default; - Optional serviceDataAccessAuthIdentity = default; - DatastoreCredentials credentials = default; - DatastoreType datastoreType = default; - Optional isDefault = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accountName")) - { - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoint")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - endpoint = null; - continue; - } - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("filesystem")) - { - filesystem = property.Value.GetString(); - continue; - } - if (property.NameEquals("protocol")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - protocol = null; - continue; - } - protocol = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceDataAccessAuthIdentity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - serviceDataAccessAuthIdentity = new ServiceDataAccessAuthIdentity(property.Value.GetString()); - continue; - } - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("datastoreType")) - { - datastoreType = new DatastoreType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new AzureDataLakeGen2Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName, endpoint.Value, filesystem, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen2Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen2Datastore.cs deleted file mode 100644 index f345e98d446a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureDataLakeGen2Datastore.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; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure Data Lake Gen2 datastore configuration. - public partial class AzureDataLakeGen2Datastore : DatastoreProperties - { - /// Initializes a new instance of AzureDataLakeGen2Datastore. - /// - /// [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 Data Lake Gen2 filesystem. - /// , or is null. - public AzureDataLakeGen2Datastore(DatastoreCredentials credentials, string accountName, string filesystem) : base(credentials) - { - Argument.AssertNotNull(credentials, nameof(credentials)); - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(filesystem, nameof(filesystem)); - - AccountName = accountName; - Filesystem = filesystem; - DatastoreType = DatastoreType.AzureDataLakeGen2; - } - - /// Initializes a new instance of AzureDataLakeGen2Datastore. - /// 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 . - /// - /// [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 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. - internal AzureDataLakeGen2Datastore(string description, IDictionary properties, IDictionary tags, DatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string filesystem, string protocol, ServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) - { - AccountName = accountName; - Endpoint = endpoint; - Filesystem = filesystem; - Protocol = protocol; - ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - DatastoreType = datastoreType; - } - - /// [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 ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureFileDatastore.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureFileDatastore.Serialization.cs deleted file mode 100644 index 0bb0dbdcf1fa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureFileDatastore.Serialization.cs +++ /dev/null @@ -1,240 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class AzureFileDatastore : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("accountName"); - writer.WriteStringValue(AccountName); - if (Optional.IsDefined(Endpoint)) - { - if (Endpoint != null) - { - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - } - else - { - writer.WriteNull("endpoint"); - } - } - writer.WritePropertyName("fileShareName"); - writer.WriteStringValue(FileShareName); - if (Optional.IsDefined(Protocol)) - { - if (Protocol != null) - { - writer.WritePropertyName("protocol"); - writer.WriteStringValue(Protocol); - } - else - { - writer.WriteNull("protocol"); - } - } - if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) - { - writer.WritePropertyName("serviceDataAccessAuthIdentity"); - writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); - } - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("datastoreType"); - writer.WriteStringValue(DatastoreType.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static AzureFileDatastore DeserializeAzureFileDatastore(JsonElement element) - { - string accountName = default; - Optional endpoint = default; - string fileShareName = default; - Optional protocol = default; - Optional serviceDataAccessAuthIdentity = default; - DatastoreCredentials credentials = default; - DatastoreType datastoreType = default; - Optional isDefault = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accountName")) - { - accountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoint")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - endpoint = null; - continue; - } - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("fileShareName")) - { - fileShareName = property.Value.GetString(); - continue; - } - if (property.NameEquals("protocol")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - protocol = null; - continue; - } - protocol = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceDataAccessAuthIdentity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - serviceDataAccessAuthIdentity = new ServiceDataAccessAuthIdentity(property.Value.GetString()); - continue; - } - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("datastoreType")) - { - datastoreType = new DatastoreType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new AzureFileDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName, endpoint.Value, fileShareName, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureFileDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureFileDatastore.cs deleted file mode 100644 index 0a39060cce84..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/AzureFileDatastore.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; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Azure File datastore configuration. - public partial class AzureFileDatastore : DatastoreProperties - { - /// Initializes a new instance of AzureFileDatastore. - /// - /// [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. - /// , or is null. - public AzureFileDatastore(DatastoreCredentials credentials, string accountName, string fileShareName) : base(credentials) - { - Argument.AssertNotNull(credentials, nameof(credentials)); - Argument.AssertNotNull(accountName, nameof(accountName)); - Argument.AssertNotNull(fileShareName, nameof(fileShareName)); - - AccountName = accountName; - FileShareName = fileShareName; - DatastoreType = DatastoreType.AzureFile; - } - - /// Initializes a new instance of AzureFileDatastore. - /// 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 . - /// - /// [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. - /// Protocol used to communicate with the storage account. - /// Indicates which identity to use to authenticate service data access to customer's storage. - internal AzureFileDatastore(string description, IDictionary properties, IDictionary tags, DatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string fileShareName, string protocol, ServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) - { - AccountName = accountName; - Endpoint = endpoint; - FileShareName = fileShareName; - Protocol = protocol; - ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; - DatastoreType = datastoreType; - } - - /// [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; } - /// 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 ServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } - } -} 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 7c766ce2a54d..92b56d9e7152 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BanditPolicy.cs @@ -7,8 +7,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. - public partial class BanditPolicy : EarlyTerminationPolicy + /// + /// Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation + /// Serialized Name: BanditPolicy + /// + public partial class BanditPolicy : MachineLearningEarlyTerminationPolicy { /// Initializes a new instance of BanditPolicy. public BanditPolicy() @@ -17,11 +20,26 @@ public BanditPolicy() } /// Initializes a new instance of BanditPolicy. - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. - /// [Required] Name of policy configuration. - /// Absolute distance allowed from the best performing run. - /// Ratio of the allowed distance from the best performing run. + /// + /// Number of intervals by which to delay the first evaluation. + /// Serialized Name: EarlyTerminationPolicy.delayEvaluation + /// + /// + /// Interval (number of runs) between policy evaluations. + /// Serialized Name: EarlyTerminationPolicy.evaluationInterval + /// + /// + /// [Required] Name of policy configuration + /// Serialized Name: EarlyTerminationPolicy.policyType + /// + /// + /// Absolute distance allowed from the best performing run. + /// Serialized Name: BanditPolicy.slackAmount + /// + /// + /// Ratio of the allowed distance from the best performing run. + /// Serialized Name: BanditPolicy.slackFactor + /// internal BanditPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, float? slackAmount, float? slackFactor) : base(delayEvaluation, evaluationInterval, policyType) { SlackAmount = slackAmount; @@ -29,9 +47,15 @@ internal BanditPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTermin PolicyType = policyType; } - /// Absolute distance allowed from the best performing run. + /// + /// Absolute distance allowed from the best performing run. + /// Serialized Name: BanditPolicy.slackAmount + /// public float? SlackAmount { get; set; } - /// Ratio of the allowed distance from the best performing run. + /// + /// Ratio of the allowed distance from the best performing run. + /// Serialized Name: BanditPolicy.slackFactor + /// public float? SlackFactor { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentData.Serialization.cs deleted file mode 100644 index b0c494752edb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentData.Serialization.cs +++ /dev/null @@ -1,149 +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 Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class BatchDeploymentData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - writer.WriteEndObject(); - } - - internal static BatchDeploymentData DeserializeBatchDeploymentData(JsonElement element) - { - Optional identity = default; - Optional kind = default; - BatchDeploymentProperties properties = default; - Optional sku = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); - continue; - } - if (property.NameEquals("kind")) - { - kind = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = BatchDeploymentProperties.DeserializeBatchDeploymentProperties(property.Value); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location")) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new BatchDeploymentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentPatch.Serialization.cs deleted file mode 100644 index 7b4c30ec73ce..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentPatch.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class BatchDeploymentPatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentPatch.cs deleted file mode 100644 index 862d929ab73f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentPatch.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Strictly used in update requests. - public partial class BatchDeploymentPatch - { - /// Initializes a new instance of BatchDeploymentPatch. - public BatchDeploymentPatch() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Additional attributes of the entity. - internal PartialBatchDeployment Properties { get; set; } - /// Description of the endpoint deployment. - public string PartialBatchDeploymentDescription - { - get => Properties is null ? default : Properties.Description; - set - { - if (Properties is null) - Properties = new PartialBatchDeployment(); - Properties.Description = value; - } - } - - /// Resource tags. - public IDictionary Tags { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentProperties.Serialization.cs deleted file mode 100644 index fdca31f57374..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentProperties.Serialization.cs +++ /dev/null @@ -1,375 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class BatchDeploymentProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Compute)) - { - if (Compute != null) - { - writer.WritePropertyName("compute"); - writer.WriteStringValue(Compute); - } - else - { - writer.WriteNull("compute"); - } - } - if (Optional.IsDefined(ErrorThreshold)) - { - writer.WritePropertyName("errorThreshold"); - writer.WriteNumberValue(ErrorThreshold.Value); - } - if (Optional.IsDefined(LoggingLevel)) - { - writer.WritePropertyName("loggingLevel"); - writer.WriteStringValue(LoggingLevel.Value.ToString()); - } - if (Optional.IsDefined(MaxConcurrencyPerInstance)) - { - writer.WritePropertyName("maxConcurrencyPerInstance"); - writer.WriteNumberValue(MaxConcurrencyPerInstance.Value); - } - if (Optional.IsDefined(MiniBatchSize)) - { - writer.WritePropertyName("miniBatchSize"); - writer.WriteNumberValue(MiniBatchSize.Value); - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"); - writer.WriteObjectValue(Model); - } - else - { - writer.WriteNull("model"); - } - } - if (Optional.IsDefined(OutputAction)) - { - writer.WritePropertyName("outputAction"); - writer.WriteStringValue(OutputAction.Value.ToString()); - } - if (Optional.IsDefined(OutputFileName)) - { - writer.WritePropertyName("outputFileName"); - writer.WriteStringValue(OutputFileName); - } - if (Optional.IsDefined(Resources)) - { - if (Resources != null) - { - writer.WritePropertyName("resources"); - writer.WriteObjectValue(Resources); - } - else - { - writer.WriteNull("resources"); - } - } - if (Optional.IsDefined(RetrySettings)) - { - if (RetrySettings != null) - { - writer.WritePropertyName("retrySettings"); - writer.WriteObjectValue(RetrySettings); - } - else - { - writer.WriteNull("retrySettings"); - } - } - if (Optional.IsDefined(CodeConfiguration)) - { - if (CodeConfiguration != null) - { - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - } - else - { - writer.WriteNull("codeConfiguration"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(EnvironmentId)) - { - if (EnvironmentId != null) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - else - { - writer.WriteNull("environmentId"); - } - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - if (EnvironmentVariables != null) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("environmentVariables"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static BatchDeploymentProperties DeserializeBatchDeploymentProperties(JsonElement element) - { - Optional compute = default; - Optional errorThreshold = default; - Optional loggingLevel = default; - Optional maxConcurrencyPerInstance = default; - Optional miniBatchSize = default; - Optional model = default; - Optional outputAction = default; - Optional outputFileName = default; - Optional provisioningState = default; - Optional resources = default; - Optional retrySettings = default; - Optional codeConfiguration = default; - Optional description = default; - Optional environmentId = default; - Optional> environmentVariables = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("compute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - compute = null; - continue; - } - compute = property.Value.GetString(); - continue; - } - if (property.NameEquals("errorThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - errorThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("loggingLevel")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - loggingLevel = new BatchLoggingLevel(property.Value.GetString()); - continue; - } - if (property.NameEquals("maxConcurrencyPerInstance")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxConcurrencyPerInstance = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("miniBatchSize")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - miniBatchSize = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("model")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = AssetReferenceBase.DeserializeAssetReferenceBase(property.Value); - continue; - } - if (property.NameEquals("outputAction")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - outputAction = new BatchOutputAction(property.Value.GetString()); - continue; - } - if (property.NameEquals("outputFileName")) - { - outputFileName = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new DeploymentProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("resources")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resources = null; - continue; - } - resources = DeploymentResourceConfiguration.DeserializeDeploymentResourceConfiguration(property.Value); - continue; - } - if (property.NameEquals("retrySettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - retrySettings = null; - continue; - } - retrySettings = BatchRetrySettings.DeserializeBatchRetrySettings(property.Value); - continue; - } - if (property.NameEquals("codeConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeConfiguration = null; - continue; - } - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentId = null; - continue; - } - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentVariables = 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, property0.Value.GetString()); - } - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - } - return new BatchDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), compute.Value, Optional.ToNullable(errorThreshold), Optional.ToNullable(loggingLevel), Optional.ToNullable(maxConcurrencyPerInstance), Optional.ToNullable(miniBatchSize), model.Value, Optional.ToNullable(outputAction), outputFileName.Value, Optional.ToNullable(provisioningState), resources.Value, retrySettings.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentProperties.cs deleted file mode 100644 index 2ceaf46ea3a4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentProperties.cs +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Batch inference settings per deployment. - public partial class BatchDeploymentProperties : EndpointDeploymentPropertiesBase - { - /// Initializes a new instance of BatchDeploymentProperties. - public BatchDeploymentProperties() - { - } - - /// Initializes a new instance of BatchDeploymentProperties. - /// 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. - /// - /// 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. - /// - internal BatchDeploymentProperties(CodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, string compute, int? errorThreshold, BatchLoggingLevel? loggingLevel, int? maxConcurrencyPerInstance, long? miniBatchSize, AssetReferenceBase model, BatchOutputAction? outputAction, string outputFileName, DeploymentProvisioningState? provisioningState, DeploymentResourceConfiguration resources, BatchRetrySettings retrySettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties) - { - Compute = compute; - ErrorThreshold = errorThreshold; - LoggingLevel = loggingLevel; - MaxConcurrencyPerInstance = maxConcurrencyPerInstance; - MiniBatchSize = miniBatchSize; - Model = model; - OutputAction = outputAction; - OutputFileName = outputFileName; - ProvisioningState = provisioningState; - Resources = resources; - RetrySettings = retrySettings; - } - - /// Compute target for batch inference operation. - public string Compute { get; set; } - /// - /// 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. - /// - public int? ErrorThreshold { get; set; } - /// Logging level for batch inference operation. - public BatchLoggingLevel? LoggingLevel { get; set; } - /// Indicates maximum number of parallelism per instance. - public int? MaxConcurrencyPerInstance { 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; } - /// - /// 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 AssetReferenceBase Model { get; set; } - /// Indicates how the output will be organized. - public BatchOutputAction? OutputAction { get; set; } - /// Customized output file name for append_row output action. - public string OutputFileName { get; set; } - /// Provisioning state for the endpoint deployment. - public DeploymentProvisioningState? ProvisioningState { get; } - /// - /// Indicates compute configuration for the job. - /// If not provided, will default to the defaults defined in ResourceConfiguration. - /// - public DeploymentResourceConfiguration Resources { get; set; } - /// - /// Retry Settings for the batch inference operation. - /// If not provided, will default to the defaults defined in BatchRetrySettings. - /// - public BatchRetrySettings RetrySettings { 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 6fdde3b59270..f615d7ddbe60 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 @@ -17,7 +17,7 @@ internal partial class BatchDeploymentTrackedResourceArmPaginatedResult internal static BatchDeploymentTrackedResourceArmPaginatedResult DeserializeBatchDeploymentTrackedResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static BatchDeploymentTrackedResourceArmPaginatedResult DeserializeBatc property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(BatchDeploymentData.DeserializeBatchDeploymentData(item)); + array.Add(MachineLearningBatchDeploymentData.DeserializeMachineLearningBatchDeploymentData(item)); } value = array; continue; 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 d08345d18162..cb0957dc70ab 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchDeploymentTrackedResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of BatchDeployment entities. + /// + /// A paginated list of BatchDeployment entities. + /// Serialized Name: BatchDeploymentTrackedResourceArmPaginatedResult + /// internal partial class BatchDeploymentTrackedResourceArmPaginatedResult { /// Initializes a new instance of BatchDeploymentTrackedResourceArmPaginatedResult. internal BatchDeploymentTrackedResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of BatchDeploymentTrackedResourceArmPaginatedResult. - /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. - /// An array of objects of type BatchDeployment. - internal BatchDeploymentTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. + /// Serialized Name: BatchDeploymentTrackedResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type BatchDeployment. + /// Serialized Name: BatchDeploymentTrackedResourceArmPaginatedResult.value + /// + internal BatchDeploymentTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. + /// + /// The link to the next page of BatchDeployment objects. If null, there are no additional pages. + /// Serialized Name: BatchDeploymentTrackedResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type BatchDeployment. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type BatchDeployment. + /// Serialized Name: BatchDeploymentTrackedResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointData.Serialization.cs deleted file mode 100644 index 104f0dc327b2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointData.Serialization.cs +++ /dev/null @@ -1,149 +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 Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class BatchEndpointData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - writer.WriteEndObject(); - } - - internal static BatchEndpointData DeserializeBatchEndpointData(JsonElement element) - { - Optional identity = default; - Optional kind = default; - BatchEndpointProperties properties = default; - Optional sku = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); - continue; - } - if (property.NameEquals("kind")) - { - kind = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = BatchEndpointProperties.DeserializeBatchEndpointProperties(property.Value); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location")) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new BatchEndpointData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointDefaults.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointDefaults.cs index ad4fe76db4c2..4bfc1a839ce5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointDefaults.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointDefaults.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Batch endpoint default values. + /// + /// Batch endpoint default values + /// Serialized Name: BatchEndpointDefaults + /// internal partial class BatchEndpointDefaults { /// Initializes a new instance of BatchEndpointDefaults. @@ -19,6 +22,7 @@ public BatchEndpointDefaults() /// /// Name of the deployment that will be default for the endpoint. /// This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + /// Serialized Name: BatchEndpointDefaults.deploymentName /// internal BatchEndpointDefaults(string deploymentName) { @@ -28,6 +32,7 @@ internal BatchEndpointDefaults(string deploymentName) /// /// Name of the deployment that will be default for the endpoint. /// This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + /// Serialized Name: BatchEndpointDefaults.deploymentName /// public string DeploymentName { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointProperties.Serialization.cs deleted file mode 100644 index 90568a2090bb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointProperties.Serialization.cs +++ /dev/null @@ -1,182 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class BatchEndpointProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Defaults)) - { - if (Defaults != null) - { - writer.WritePropertyName("defaults"); - writer.WriteObjectValue(Defaults); - } - else - { - writer.WriteNull("defaults"); - } - } - writer.WritePropertyName("authMode"); - writer.WriteStringValue(AuthMode.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(Keys)) - { - if (Keys != null) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - else - { - writer.WriteNull("keys"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static BatchEndpointProperties DeserializeBatchEndpointProperties(JsonElement element) - { - Optional defaults = default; - Optional provisioningState = default; - EndpointAuthMode authMode = default; - Optional description = default; - Optional keys = default; - Optional> properties = default; - Optional scoringUri = default; - Optional swaggerUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("defaults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - defaults = null; - continue; - } - defaults = BatchEndpointDefaults.DeserializeBatchEndpointDefaults(property.Value); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new EndpointProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("authMode")) - { - authMode = new EndpointAuthMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("keys")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - keys = null; - continue; - } - keys = EndpointAuthKeys.DeserializeEndpointAuthKeys(property.Value); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("scoringUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - scoringUri = null; - continue; - } - scoringUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("swaggerUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - swaggerUri = null; - continue; - } - swaggerUri = new Uri(property.Value.GetString()); - continue; - } - } - return new BatchEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value, defaults.Value, Optional.ToNullable(provisioningState)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointProperties.cs deleted file mode 100644 index bce4b23ad443..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointProperties.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.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Batch endpoint configuration. - public partial class BatchEndpointProperties : EndpointPropertiesBase - { - /// Initializes a new instance of BatchEndpointProperties. - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - public BatchEndpointProperties(EndpointAuthMode authMode) : base(authMode) - { - } - - /// Initializes a new instance of BatchEndpointProperties. - /// [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. - internal BatchEndpointProperties(EndpointAuthMode authMode, string description, EndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, BatchEndpointDefaults defaults, EndpointProvisioningState? provisioningState) : base(authMode, description, keys, properties, scoringUri, swaggerUri) - { - Defaults = defaults; - ProvisioningState = provisioningState; - } - - /// Default values for Batch Endpoint. - internal BatchEndpointDefaults Defaults { get; set; } - /// - /// Name of the deployment that will be default for the endpoint. - /// This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. - /// - public string DefaultsDeploymentName - { - get => Defaults is null ? default : Defaults.DeploymentName; - set - { - if (Defaults is null) - Defaults = new BatchEndpointDefaults(); - Defaults.DeploymentName = value; - } - } - - /// Provisioning state for the endpoint. - public EndpointProvisioningState? ProvisioningState { 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 9be9b41edc3c..25af94897ea4 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 @@ -17,7 +17,7 @@ internal partial class BatchEndpointTrackedResourceArmPaginatedResult internal static BatchEndpointTrackedResourceArmPaginatedResult DeserializeBatchEndpointTrackedResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static BatchEndpointTrackedResourceArmPaginatedResult DeserializeBatchE property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(BatchEndpointData.DeserializeBatchEndpointData(item)); + array.Add(MachineLearningBatchEndpointData.DeserializeMachineLearningBatchEndpointData(item)); } value = array; continue; 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 48e825e487e4..fbab7e4e7b39 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchEndpointTrackedResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of BatchEndpoint entities. + /// + /// A paginated list of BatchEndpoint entities. + /// Serialized Name: BatchEndpointTrackedResourceArmPaginatedResult + /// internal partial class BatchEndpointTrackedResourceArmPaginatedResult { /// Initializes a new instance of BatchEndpointTrackedResourceArmPaginatedResult. internal BatchEndpointTrackedResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of BatchEndpointTrackedResourceArmPaginatedResult. - /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. - /// An array of objects of type BatchEndpoint. - internal BatchEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. + /// Serialized Name: BatchEndpointTrackedResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type BatchEndpoint. + /// Serialized Name: BatchEndpointTrackedResourceArmPaginatedResult.value + /// + internal BatchEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. + /// + /// The link to the next page of BatchEndpoint objects. If null, there are no additional pages. + /// Serialized Name: BatchEndpointTrackedResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type BatchEndpoint. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type BatchEndpoint. + /// Serialized Name: BatchEndpointTrackedResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchLoggingLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchLoggingLevel.cs deleted file mode 100644 index 830f70c70855..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchLoggingLevel.cs +++ /dev/null @@ -1,58 +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 -{ - /// - /// Log verbosity for batch inferencing. - /// Increasing verbosity order for logging is : Warning, Info and Debug. - /// The default value is Info. - /// - public readonly partial struct BatchLoggingLevel : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BatchLoggingLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InfoValue = "Info"; - private const string WarningValue = "Warning"; - private const string DebugValue = "Debug"; - - /// Info. - public static BatchLoggingLevel Info { get; } = new BatchLoggingLevel(InfoValue); - /// Warning. - public static BatchLoggingLevel Warning { get; } = new BatchLoggingLevel(WarningValue); - /// Debug. - public static BatchLoggingLevel Debug { get; } = new BatchLoggingLevel(DebugValue); - /// Determines if two values are the same. - public static bool operator ==(BatchLoggingLevel left, BatchLoggingLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BatchLoggingLevel left, BatchLoggingLevel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BatchLoggingLevel(string value) => new BatchLoggingLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BatchLoggingLevel other && Equals(other); - /// - public bool Equals(BatchLoggingLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchOutputAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchOutputAction.cs deleted file mode 100644 index 37962e46ed33..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchOutputAction.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 how batch inferencing will handle output. - public readonly partial struct BatchOutputAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BatchOutputAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SummaryOnlyValue = "SummaryOnly"; - private const string AppendRowValue = "AppendRow"; - - /// SummaryOnly. - public static BatchOutputAction SummaryOnly { get; } = new BatchOutputAction(SummaryOnlyValue); - /// AppendRow. - public static BatchOutputAction AppendRow { get; } = new BatchOutputAction(AppendRowValue); - /// Determines if two values are the same. - public static bool operator ==(BatchOutputAction left, BatchOutputAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BatchOutputAction left, BatchOutputAction right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BatchOutputAction(string value) => new BatchOutputAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BatchOutputAction other && Equals(other); - /// - public bool Equals(BatchOutputAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchRetrySettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchRetrySettings.Serialization.cs deleted file mode 100644 index b96e0fc466a0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchRetrySettings.Serialization.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class BatchRetrySettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxRetries)) - { - writer.WritePropertyName("maxRetries"); - writer.WriteNumberValue(MaxRetries.Value); - } - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(Timeout.Value, "P"); - } - writer.WriteEndObject(); - } - - internal static BatchRetrySettings DeserializeBatchRetrySettings(JsonElement element) - { - Optional maxRetries = default; - Optional timeout = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxRetries")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxRetries = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - } - return new BatchRetrySettings(Optional.ToNullable(maxRetries), Optional.ToNullable(timeout)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchRetrySettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchRetrySettings.cs deleted file mode 100644 index f2471549fb5a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BatchRetrySettings.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Retry settings for a batch inference operation. - public partial class BatchRetrySettings - { - /// Initializes a new instance of BatchRetrySettings. - public BatchRetrySettings() - { - } - - /// Initializes a new instance of BatchRetrySettings. - /// Maximum retry count for a mini-batch. - /// Invocation timeout for a mini-batch, in ISO 8601 format. - internal BatchRetrySettings(int? maxRetries, TimeSpan? timeout) - { - MaxRetries = maxRetries; - Timeout = timeout; - } - - /// Maximum retry count for a mini-batch. - public int? MaxRetries { get; set; } - /// Invocation timeout for a mini-batch, in ISO 8601 format. - public TimeSpan? Timeout { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BayesianSamplingAlgorithm.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BayesianSamplingAlgorithm.cs index a21b41cebae4..32ebab66a88d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BayesianSamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BayesianSamplingAlgorithm.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Defines a Sampling Algorithm that generates values based on previous values. + /// + /// Defines a Sampling Algorithm that generates values based on previous values + /// Serialized Name: BayesianSamplingAlgorithm + /// public partial class BayesianSamplingAlgorithm : SamplingAlgorithm { /// Initializes a new instance of BayesianSamplingAlgorithm. @@ -17,7 +20,10 @@ public BayesianSamplingAlgorithm() } /// Initializes a new instance of BayesianSamplingAlgorithm. - /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. + /// + /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties + /// Serialized Name: SamplingAlgorithm.samplingAlgorithmType + /// internal BayesianSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType) : base(samplingAlgorithmType) { SamplingAlgorithmType = samplingAlgorithmType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BillingCurrency.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BillingCurrency.cs deleted file mode 100644 index 7a6f23ebd909..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BillingCurrency.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Three lettered code specifying the currency of the VM price. Example: USD. - public readonly partial struct BillingCurrency : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public BillingCurrency(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UsdValue = "USD"; - - /// USD. - public static BillingCurrency Usd { get; } = new BillingCurrency(UsdValue); - /// Determines if two values are the same. - public static bool operator ==(BillingCurrency left, BillingCurrency right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(BillingCurrency left, BillingCurrency right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator BillingCurrency(string value) => new BillingCurrency(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is BillingCurrency other && Equals(other); - /// - public bool Equals(BillingCurrency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlockedTransformer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlockedTransformer.cs index d84e85a7d6a7..3c659e8842aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlockedTransformer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BlockedTransformer.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum for all classification models supported by AutoML. + /// + /// Enum for all classification models supported by AutoML. + /// Serialized Name: BlockedTransformers + /// public readonly partial struct BlockedTransformer : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public BlockedTransformer(string value) private const string CountVectorizerValue = "CountVectorizer"; private const string HashOneHotEncoderValue = "HashOneHotEncoder"; - /// Target encoding for text data. + /// + /// Target encoding for text data. + /// Serialized Name: BlockedTransformers.TextTargetEncoder + /// public static BlockedTransformer TextTargetEncoder { get; } = new BlockedTransformer(TextTargetEncoderValue); - /// Ohe hot encoding creates a binary feature transformation. + /// + /// Ohe hot encoding creates a binary feature transformation. + /// Serialized Name: BlockedTransformers.OneHotEncoder + /// public static BlockedTransformer OneHotEncoder { get; } = new BlockedTransformer(OneHotEncoderValue); - /// Target encoding for categorical data. + /// + /// Target encoding for categorical data. + /// Serialized Name: BlockedTransformers.CatTargetEncoder + /// public static BlockedTransformer CatTargetEncoder { get; } = new BlockedTransformer(CatTargetEncoderValue); - /// Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents. + /// + /// Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents. + /// Serialized Name: BlockedTransformers.TfIdf + /// public static BlockedTransformer TfIdf { get; } = new BlockedTransformer(TfIdfValue); - /// Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights. + /// + /// Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights. + /// Serialized Name: BlockedTransformers.WoETargetEncoder + /// public static BlockedTransformer WoETargetEncoder { get; } = new BlockedTransformer(WoETargetEncoderValue); - /// Label encoder converts labels/categorical variables in a numerical form. + /// + /// Label encoder converts labels/categorical variables in a numerical form. + /// Serialized Name: BlockedTransformers.LabelEncoder + /// public static BlockedTransformer LabelEncoder { get; } = new BlockedTransformer(LabelEncoderValue); - /// Word embedding helps represents words or phrases as a vector, or a series of numbers. + /// + /// Word embedding helps represents words or phrases as a vector, or a series of numbers. + /// Serialized Name: BlockedTransformers.WordEmbedding + /// public static BlockedTransformer WordEmbedding { get; } = new BlockedTransformer(WordEmbeddingValue); - /// Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed. + /// + /// Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed. + /// Serialized Name: BlockedTransformers.NaiveBayes + /// public static BlockedTransformer NaiveBayes { get; } = new BlockedTransformer(NaiveBayesValue); - /// Count Vectorizer converts a collection of text documents to a matrix of token counts. + /// + /// Count Vectorizer converts a collection of text documents to a matrix of token counts. + /// Serialized Name: BlockedTransformers.CountVectorizer + /// public static BlockedTransformer CountVectorizer { get; } = new BlockedTransformer(CountVectorizerValue); - /// Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features. + /// + /// Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features. + /// Serialized Name: BlockedTransformers.HashOneHotEncoder + /// public static BlockedTransformer HashOneHotEncoder { get; } = new BlockedTransformer(HashOneHotEncoderValue); /// Determines if two values are the same. public static bool operator ==(BlockedTransformer left, BlockedTransformer right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BuildContext.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BuildContext.Serialization.cs deleted file mode 100644 index d851129d76e0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BuildContext.Serialization.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class BuildContext : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("contextUri"); - writer.WriteStringValue(ContextUri.AbsoluteUri); - if (Optional.IsDefined(DockerfilePath)) - { - writer.WritePropertyName("dockerfilePath"); - writer.WriteStringValue(DockerfilePath); - } - writer.WriteEndObject(); - } - - internal static BuildContext DeserializeBuildContext(JsonElement element) - { - Uri contextUri = default; - Optional dockerfilePath = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("contextUri")) - { - contextUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("dockerfilePath")) - { - dockerfilePath = property.Value.GetString(); - continue; - } - } - return new BuildContext(contextUri, dockerfilePath.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BuildContext.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BuildContext.cs deleted file mode 100644 index 3aebb5c53a5e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/BuildContext.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Configuration settings for Docker build context. - public partial class BuildContext - { - /// Initializes a new instance of BuildContext. - /// - /// [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. - /// <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" /> - /// - /// is null. - public BuildContext(Uri contextUri) - { - Argument.AssertNotNull(contextUri, nameof(contextUri)); - - ContextUri = contextUri; - } - - /// Initializes a new instance of BuildContext. - /// - /// [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. - /// <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" /> - /// - /// - /// Path to the Dockerfile in the build context. - /// <seealso href="https://docs.docker.com/engine/reference/builder/" /> - /// - internal BuildContext(Uri contextUri, string dockerfilePath) - { - ContextUri = contextUri; - DockerfilePath = dockerfilePath; - } - - /// - /// [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. - /// <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" /> - /// - public Uri ContextUri { get; set; } - /// - /// Path to the Dockerfile in the build context. - /// <seealso href="https://docs.docker.com/engine/reference/builder/" /> - /// - public string DockerfilePath { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Caching.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Caching.cs deleted file mode 100644 index 355b03f5fdd0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Caching.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 -{ - /// Caching type of Data Disk. - public readonly partial struct Caching : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Caching(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string ReadOnlyValue = "ReadOnly"; - private const string ReadWriteValue = "ReadWrite"; - - /// None. - public static Caching None { get; } = new Caching(NoneValue); - /// ReadOnly. - public static Caching ReadOnly { get; } = new Caching(ReadOnlyValue); - /// ReadWrite. - public static Caching ReadWrite { get; } = new Caching(ReadWriteValue); - /// Determines if two values are the same. - public static bool operator ==(Caching left, Caching right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Caching left, Caching right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Caching(string value) => new Caching(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Caching other && Equals(other); - /// - public bool Equals(Caching other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreCredentials.Serialization.cs deleted file mode 100644 index d72e95896219..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CertificateDatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AuthorityUri)) - { - if (AuthorityUri != null) - { - writer.WritePropertyName("authorityUrl"); - writer.WriteStringValue(AuthorityUri.AbsoluteUri); - } - else - { - writer.WriteNull("authorityUrl"); - } - } - writer.WritePropertyName("clientId"); - writer.WriteStringValue(ClientId); - if (Optional.IsDefined(ResourceUri)) - { - if (ResourceUri != null) - { - writer.WritePropertyName("resourceUrl"); - writer.WriteStringValue(ResourceUri.AbsoluteUri); - } - else - { - writer.WriteNull("resourceUrl"); - } - } - writer.WritePropertyName("secrets"); - writer.WriteObjectValue(Secrets); - writer.WritePropertyName("tenantId"); - writer.WriteStringValue(TenantId); - writer.WritePropertyName("thumbprint"); - writer.WriteStringValue(Thumbprint); - writer.WritePropertyName("credentialsType"); - writer.WriteStringValue(CredentialsType.ToString()); - writer.WriteEndObject(); - } - - internal static CertificateDatastoreCredentials DeserializeCertificateDatastoreCredentials(JsonElement element) - { - Optional authorityUrl = default; - Guid clientId = default; - Optional resourceUrl = default; - CertificateDatastoreSecrets secrets = default; - Guid tenantId = default; - string thumbprint = default; - CredentialsType credentialsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authorityUrl")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - authorityUrl = null; - continue; - } - authorityUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("clientId")) - { - clientId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("resourceUrl")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceUrl = null; - continue; - } - resourceUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("secrets")) - { - secrets = CertificateDatastoreSecrets.DeserializeCertificateDatastoreSecrets(property.Value); - continue; - } - if (property.NameEquals("tenantId")) - { - tenantId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("thumbprint")) - { - thumbprint = property.Value.GetString(); - continue; - } - if (property.NameEquals("credentialsType")) - { - credentialsType = new CredentialsType(property.Value.GetString()); - continue; - } - } - return new CertificateDatastoreCredentials(credentialsType, authorityUrl.Value, clientId, resourceUrl.Value, secrets, tenantId, thumbprint); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreCredentials.cs deleted file mode 100644 index 287cd8c8acd8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreCredentials.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Certificate datastore credentials configuration. - public partial class CertificateDatastoreCredentials : DatastoreCredentials - { - /// Initializes a new instance of CertificateDatastoreCredentials. - /// [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 CertificateDatastoreCredentials(Guid clientId, CertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) - { - Argument.AssertNotNull(secrets, nameof(secrets)); - Argument.AssertNotNull(thumbprint, nameof(thumbprint)); - - ClientId = clientId; - Secrets = secrets; - TenantId = tenantId; - Thumbprint = thumbprint; - CredentialsType = CredentialsType.Certificate; - } - - /// Initializes a new instance of CertificateDatastoreCredentials. - /// [Required] Credential type used to authentication with storage. - /// 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] Thumbprint of the certificate used for authentication. - internal CertificateDatastoreCredentials(CredentialsType credentialsType, Uri authorityUri, Guid clientId, Uri resourceUri, CertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) : base(credentialsType) - { - AuthorityUri = authorityUri; - ClientId = clientId; - ResourceUri = resourceUri; - Secrets = secrets; - TenantId = tenantId; - Thumbprint = thumbprint; - CredentialsType = credentialsType; - } - - /// 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 CertificateDatastoreSecrets Secrets { get; set; } - /// [Required] ID of the tenant to which the service principal belongs. - public Guid TenantId { get; set; } - /// [Required] Thumbprint of the certificate used for authentication. - public string Thumbprint { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreSecrets.Serialization.cs deleted file mode 100644 index 4d7703126557..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreSecrets.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CertificateDatastoreSecrets : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Certificate)) - { - if (Certificate != null) - { - writer.WritePropertyName("certificate"); - writer.WriteStringValue(Certificate); - } - else - { - writer.WriteNull("certificate"); - } - } - writer.WritePropertyName("secretsType"); - writer.WriteStringValue(SecretsType.ToString()); - writer.WriteEndObject(); - } - - internal static CertificateDatastoreSecrets DeserializeCertificateDatastoreSecrets(JsonElement element) - { - Optional certificate = default; - SecretsType secretsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("certificate")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - certificate = null; - continue; - } - certificate = property.Value.GetString(); - continue; - } - if (property.NameEquals("secretsType")) - { - secretsType = new SecretsType(property.Value.GetString()); - continue; - } - } - return new CertificateDatastoreSecrets(secretsType, certificate.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreSecrets.cs deleted file mode 100644 index 02150ee5393c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CertificateDatastoreSecrets.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Datastore certificate secrets. - public partial class CertificateDatastoreSecrets : DatastoreSecrets - { - /// Initializes a new instance of CertificateDatastoreSecrets. - public CertificateDatastoreSecrets() - { - SecretsType = SecretsType.Certificate; - } - - /// Initializes a new instance of CertificateDatastoreSecrets. - /// [Required] Credential type used to authentication with storage. - /// Service principal certificate. - internal CertificateDatastoreSecrets(SecretsType secretsType, string certificate) : base(secretsType) - { - Certificate = certificate; - SecretsType = secretsType; - } - - /// Service principal certificate. - public string Certificate { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Classification.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Classification.Serialization.cs deleted file mode 100644 index eb8c8e5e2e4a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Classification.Serialization.cs +++ /dev/null @@ -1,364 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Classification : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PositiveLabel)) - { - if (PositiveLabel != null) - { - writer.WritePropertyName("positiveLabel"); - writer.WriteStringValue(PositiveLabel); - } - else - { - writer.WriteNull("positiveLabel"); - } - } - if (Optional.IsDefined(PrimaryMetric)) - { - writer.WritePropertyName("primaryMetric"); - writer.WriteStringValue(PrimaryMetric.Value.ToString()); - } - if (Optional.IsDefined(TrainingSettings)) - { - if (TrainingSettings != null) - { - writer.WritePropertyName("trainingSettings"); - writer.WriteObjectValue(TrainingSettings); - } - else - { - writer.WriteNull("trainingSettings"); - } - } - if (Optional.IsCollectionDefined(CvSplitColumnNames)) - { - if (CvSplitColumnNames != null) - { - writer.WritePropertyName("cvSplitColumnNames"); - 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"); - writer.WriteObjectValue(FeaturizationSettings); - } - else - { - writer.WriteNull("featurizationSettings"); - } - } - if (Optional.IsDefined(LimitSettings)) - { - if (LimitSettings != null) - { - writer.WritePropertyName("limitSettings"); - writer.WriteObjectValue(LimitSettings); - } - else - { - writer.WriteNull("limitSettings"); - } - } - if (Optional.IsDefined(NCrossValidations)) - { - if (NCrossValidations != null) - { - writer.WritePropertyName("nCrossValidations"); - writer.WriteObjectValue(NCrossValidations); - } - else - { - writer.WriteNull("nCrossValidations"); - } - } - if (Optional.IsDefined(TestData)) - { - if (TestData != null) - { - writer.WritePropertyName("testData"); - writer.WriteObjectValue(TestData); - } - else - { - writer.WriteNull("testData"); - } - } - if (Optional.IsDefined(TestDataSize)) - { - if (TestDataSize != null) - { - writer.WritePropertyName("testDataSize"); - writer.WriteNumberValue(TestDataSize.Value); - } - else - { - writer.WriteNull("testDataSize"); - } - } - if (Optional.IsDefined(ValidationData)) - { - if (ValidationData != null) - { - writer.WritePropertyName("validationData"); - writer.WriteObjectValue(ValidationData); - } - else - { - writer.WriteNull("validationData"); - } - } - if (Optional.IsDefined(ValidationDataSize)) - { - if (ValidationDataSize != null) - { - writer.WritePropertyName("validationDataSize"); - writer.WriteNumberValue(ValidationDataSize.Value); - } - else - { - writer.WriteNull("validationDataSize"); - } - } - if (Optional.IsDefined(WeightColumnName)) - { - if (WeightColumnName != null) - { - writer.WritePropertyName("weightColumnName"); - writer.WriteStringValue(WeightColumnName); - } - else - { - writer.WriteNull("weightColumnName"); - } - } - if (Optional.IsDefined(LogVerbosity)) - { - writer.WritePropertyName("logVerbosity"); - writer.WriteStringValue(LogVerbosity.Value.ToString()); - } - if (Optional.IsDefined(TargetColumnName)) - { - if (TargetColumnName != null) - { - writer.WritePropertyName("targetColumnName"); - writer.WriteStringValue(TargetColumnName); - } - else - { - writer.WriteNull("targetColumnName"); - } - } - writer.WritePropertyName("taskType"); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"); - writer.WriteObjectValue(TrainingData); - writer.WriteEndObject(); - } - - internal static Classification DeserializeClassification(JsonElement element) - { - Optional positiveLabel = default; - Optional primaryMetric = default; - Optional trainingSettings = default; - Optional> cvSplitColumnNames = default; - Optional featurizationSettings = default; - Optional limitSettings = default; - Optional nCrossValidations = default; - Optional testData = default; - Optional testDataSize = default; - Optional validationData = default; - Optional validationDataSize = default; - Optional weightColumnName = default; - Optional logVerbosity = default; - Optional targetColumnName = default; - TaskType taskType = default; - MLTableJobInput trainingData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("positiveLabel")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - positiveLabel = null; - continue; - } - positiveLabel = property.Value.GetString(); - continue; - } - if (property.NameEquals("primaryMetric")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - primaryMetric = new ClassificationPrimaryMetric(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - trainingSettings = null; - continue; - } - trainingSettings = ClassificationTrainingSettings.DeserializeClassificationTrainingSettings(property.Value); - continue; - } - if (property.NameEquals("cvSplitColumnNames")) - { - 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")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - featurizationSettings = null; - continue; - } - featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); - continue; - } - if (property.NameEquals("limitSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - limitSettings = null; - continue; - } - limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value); - continue; - } - if (property.NameEquals("nCrossValidations")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nCrossValidations = null; - continue; - } - nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); - continue; - } - if (property.NameEquals("testData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - testData = null; - continue; - } - testData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); - continue; - } - if (property.NameEquals("testDataSize")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - testDataSize = null; - continue; - } - testDataSize = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("validationData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationData = null; - continue; - } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); - continue; - } - if (property.NameEquals("validationDataSize")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationDataSize = null; - continue; - } - validationDataSize = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("weightColumnName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - weightColumnName = null; - continue; - } - weightColumnName = property.Value.GetString(); - continue; - } - if (property.NameEquals("logVerbosity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - logVerbosity = new LogVerbosity(property.Value.GetString()); - continue; - } - if (property.NameEquals("targetColumnName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - targetColumnName = null; - continue; - } - targetColumnName = property.Value.GetString(); - continue; - } - if (property.NameEquals("taskType")) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData")) - { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); - continue; - } - } - return new Classification(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, positiveLabel.Value, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Classification.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Classification.cs deleted file mode 100644 index d871f0a46194..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Classification.cs +++ /dev/null @@ -1,116 +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 -{ - /// Classification task in AutoML Table vertical. - public partial class Classification : AutoMLVertical - { - /// Initializes a new instance of Classification. - /// [Required] Training data input. - /// is null. - public Classification(MLTableJobInput trainingData) : base(trainingData) - { - Argument.AssertNotNull(trainingData, nameof(trainingData)); - - CvSplitColumnNames = new ChangeTrackingList(); - TaskType = TaskType.Classification; - } - - /// Initializes a new instance of Classification. - /// 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] Task type for AutoMLJob. - /// [Required] Training data input. - /// 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. - /// Execution constraints for AutoMLJob. - /// - /// Number of cross validation folds to be applied on training dataset - /// when validation dataset is not provided. - /// Please note is the base class. According to the scenario, a derived class 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 . - /// - /// Test data input. - /// - /// 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. - /// - /// Validation data inputs. - /// - /// 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. - /// - /// 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 Classification(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, string positiveLabel, ClassificationPrimaryMetric? primaryMetric, ClassificationTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MLTableJobInput testData, double? testDataSize, MLTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) - { - PositiveLabel = positiveLabel; - PrimaryMetric = primaryMetric; - TrainingSettings = trainingSettings; - CvSplitColumnNames = cvSplitColumnNames; - FeaturizationSettings = featurizationSettings; - LimitSettings = limitSettings; - NCrossValidations = nCrossValidations; - TestData = testData; - TestDataSize = testDataSize; - ValidationData = validationData; - ValidationDataSize = validationDataSize; - WeightColumnName = weightColumnName; - TaskType = taskType; - } - - /// 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; } - /// Execution constraints for AutoMLJob. - public TableVerticalLimitSettings LimitSettings { get; set; } - /// - /// Number of cross validation folds to be applied on training dataset - /// when validation dataset is not provided. - /// Please note is the base class. According to the scenario, a derived class 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 NCrossValidations NCrossValidations { get; set; } - /// Test data input. - public MLTableJobInput TestData { get; set; } - /// - /// 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? TestDataSize { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } - /// - /// 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? 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs index b490abb4dc50..cfb3cf5100e6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationModel.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum for all classification models supported by AutoML. + /// + /// Enum for all classification models supported by AutoML. + /// Serialized Name: ClassificationModels + /// public readonly partial struct ClassificationModel : IEquatable { private readonly string _value; @@ -41,54 +44,77 @@ public ClassificationModel(string value) /// It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. /// Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. /// Although it's essentially a method for binary classification, it can also be applied to multiclass problems. + /// Serialized Name: ClassificationModels.LogisticRegression /// public static ClassificationModel LogisticRegression { get; } = new ClassificationModel(LogisticRegressionValue); /// /// SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications /// to find the model parameters that correspond to the best fit between predicted and actual outputs. + /// Serialized Name: ClassificationModels.SGD /// public static ClassificationModel SGD { get; } = new ClassificationModel(SGDValue); /// /// The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). /// The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. + /// Serialized Name: ClassificationModels.MultinomialNaiveBayes /// public static ClassificationModel MultinomialNaiveBayes { get; } = new ClassificationModel(MultinomialNaiveBayesValue); - /// Naive Bayes classifier for multivariate Bernoulli models. + /// + /// Naive Bayes classifier for multivariate Bernoulli models. + /// Serialized Name: ClassificationModels.BernoulliNaiveBayes + /// public static ClassificationModel BernoulliNaiveBayes { get; } = new ClassificationModel(BernoulliNaiveBayesValue); /// /// A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. /// After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. + /// Serialized Name: ClassificationModels.SVM /// public static ClassificationModel SVM { get; } = new ClassificationModel(SVMValue); /// /// A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. /// After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. /// Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. + /// Serialized Name: ClassificationModels.LinearSVM /// public static ClassificationModel LinearSVM { get; } = new ClassificationModel(LinearSVMValue); /// /// K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints /// which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. + /// Serialized Name: ClassificationModels.KNN /// public static ClassificationModel KNN { get; } = new ClassificationModel(KNNValue); /// /// Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. /// The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. + /// Serialized Name: ClassificationModels.DecisionTree /// public static ClassificationModel DecisionTree { get; } = new ClassificationModel(DecisionTreeValue); /// /// Random forest is a supervised learning algorithm. /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. /// The general idea of the bagging method is that a combination of learning models increases the overall result. + /// Serialized Name: ClassificationModels.RandomForest /// public static ClassificationModel RandomForest { get; } = new ClassificationModel(RandomForestValue); - /// Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + /// + /// Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + /// Serialized Name: ClassificationModels.ExtremeRandomTrees + /// public static ClassificationModel ExtremeRandomTrees { get; } = new ClassificationModel(ExtremeRandomTreesValue); - /// LightGBM is a gradient boosting framework that uses tree based learning algorithms. + /// + /// LightGBM is a gradient boosting framework that uses tree based learning algorithms. + /// Serialized Name: ClassificationModels.LightGBM + /// public static ClassificationModel LightGBM { get; } = new ClassificationModel(LightGBMValue); - /// The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + /// + /// The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + /// Serialized Name: ClassificationModels.GradientBoosting + /// public static ClassificationModel GradientBoosting { get; } = new ClassificationModel(GradientBoostingValue); - /// XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values. + /// + /// XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values. + /// Serialized Name: ClassificationModels.XGBoostClassifier + /// public static ClassificationModel XGBoostClassifier { get; } = new ClassificationModel(XGBoostClassifierValue); /// Determines if two values are the same. public static bool operator ==(ClassificationModel left, ClassificationModel right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationMultilabelPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationMultilabelPrimaryMetric.cs index c79d9075d7c6..1655d8e80279 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationMultilabelPrimaryMetric.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationMultilabelPrimaryMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Primary metrics for classification multilabel tasks. + /// + /// Primary metrics for classification multilabel tasks. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics + /// public readonly partial struct ClassificationMultilabelPrimaryMetric : IEquatable { private readonly string _value; @@ -33,23 +36,35 @@ public ClassificationMultilabelPrimaryMetric(string value) /// AUC is the Area under the curve. /// This metric represents arithmetic mean of the score for each class, /// weighted by the number of true instances in each class. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics.AUCWeighted /// public static ClassificationMultilabelPrimaryMetric AUCWeighted { get; } = new ClassificationMultilabelPrimaryMetric(AUCWeightedValue); - /// Accuracy is the ratio of predictions that exactly match the true class labels. + /// + /// Accuracy is the ratio of predictions that exactly match the true class labels. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics.Accuracy + /// public static ClassificationMultilabelPrimaryMetric Accuracy { get; } = new ClassificationMultilabelPrimaryMetric(AccuracyValue); /// /// Normalized macro recall is recall macro-averaged and normalized, so that random /// performance has a score of 0, and perfect performance has a score of 1. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics.NormMacroRecall /// public static ClassificationMultilabelPrimaryMetric NormMacroRecall { get; } = new ClassificationMultilabelPrimaryMetric(NormMacroRecallValue); /// /// The arithmetic mean of the average precision score for each class, weighted by /// the number of true instances in each class. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics.AveragePrecisionScoreWeighted /// public static ClassificationMultilabelPrimaryMetric AveragePrecisionScoreWeighted { get; } = new ClassificationMultilabelPrimaryMetric(AveragePrecisionScoreWeightedValue); - /// The arithmetic mean of precision for each class, weighted by number of true instances in each class. + /// + /// The arithmetic mean of precision for each class, weighted by number of true instances in each class. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics.PrecisionScoreWeighted + /// public static ClassificationMultilabelPrimaryMetric PrecisionScoreWeighted { get; } = new ClassificationMultilabelPrimaryMetric(PrecisionScoreWeightedValue); - /// Intersection Over Union. Intersection of predictions divided by union of predictions. + /// + /// Intersection Over Union. Intersection of predictions divided by union of predictions. + /// Serialized Name: ClassificationMultilabelPrimaryMetrics.IOU + /// public static ClassificationMultilabelPrimaryMetric IOU { get; } = new ClassificationMultilabelPrimaryMetric(IOUValue); /// Determines if two values are the same. public static bool operator ==(ClassificationMultilabelPrimaryMetric left, ClassificationMultilabelPrimaryMetric right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationPrimaryMetric.cs index 73db3debe1b9..96d863304d69 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationPrimaryMetric.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationPrimaryMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Primary metrics for classification tasks. + /// + /// Primary metrics for classification tasks. + /// Serialized Name: ClassificationPrimaryMetrics + /// public readonly partial struct ClassificationPrimaryMetric : IEquatable { private readonly string _value; @@ -32,21 +35,30 @@ public ClassificationPrimaryMetric(string value) /// AUC is the Area under the curve. /// This metric represents arithmetic mean of the score for each class, /// weighted by the number of true instances in each class. + /// Serialized Name: ClassificationPrimaryMetrics.AUCWeighted /// public static ClassificationPrimaryMetric AUCWeighted { get; } = new ClassificationPrimaryMetric(AUCWeightedValue); - /// Accuracy is the ratio of predictions that exactly match the true class labels. + /// + /// Accuracy is the ratio of predictions that exactly match the true class labels. + /// Serialized Name: ClassificationPrimaryMetrics.Accuracy + /// public static ClassificationPrimaryMetric Accuracy { get; } = new ClassificationPrimaryMetric(AccuracyValue); /// /// Normalized macro recall is recall macro-averaged and normalized, so that random /// performance has a score of 0, and perfect performance has a score of 1. + /// Serialized Name: ClassificationPrimaryMetrics.NormMacroRecall /// public static ClassificationPrimaryMetric NormMacroRecall { get; } = new ClassificationPrimaryMetric(NormMacroRecallValue); /// /// The arithmetic mean of the average precision score for each class, weighted by /// the number of true instances in each class. + /// Serialized Name: ClassificationPrimaryMetrics.AveragePrecisionScoreWeighted /// public static ClassificationPrimaryMetric AveragePrecisionScoreWeighted { get; } = new ClassificationPrimaryMetric(AveragePrecisionScoreWeightedValue); - /// The arithmetic mean of precision for each class, weighted by number of true instances in each class. + /// + /// The arithmetic mean of precision for each class, weighted by number of true instances in each class. + /// Serialized Name: ClassificationPrimaryMetrics.PrecisionScoreWeighted + /// public static ClassificationPrimaryMetric PrecisionScoreWeighted { get; } = new ClassificationPrimaryMetric(PrecisionScoreWeightedValue); /// Determines if two values are the same. public static bool operator ==(ClassificationPrimaryMetric left, ClassificationPrimaryMetric right) => left.Equals(right); 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 new file mode 100644 index 000000000000..d13f0d1d4422 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.Serialization.cs @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ClassificationTask : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PositiveLabel)) + { + if (PositiveLabel != null) + { + writer.WritePropertyName("positiveLabel"); + writer.WriteStringValue(PositiveLabel); + } + else + { + writer.WriteNull("positiveLabel"); + } + } + if (Optional.IsDefined(PrimaryMetric)) + { + writer.WritePropertyName("primaryMetric"); + writer.WriteStringValue(PrimaryMetric.Value.ToString()); + } + if (Optional.IsDefined(TrainingSettings)) + { + if (TrainingSettings != null) + { + writer.WritePropertyName("trainingSettings"); + writer.WriteObjectValue(TrainingSettings); + } + else + { + writer.WriteNull("trainingSettings"); + } + } + if (Optional.IsCollectionDefined(CvSplitColumnNames)) + { + if (CvSplitColumnNames != null) + { + writer.WritePropertyName("cvSplitColumnNames"); + 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"); + writer.WriteObjectValue(FeaturizationSettings); + } + else + { + writer.WriteNull("featurizationSettings"); + } + } + if (Optional.IsDefined(LimitSettings)) + { + if (LimitSettings != null) + { + writer.WritePropertyName("limitSettings"); + writer.WriteObjectValue(LimitSettings); + } + else + { + writer.WriteNull("limitSettings"); + } + } + if (Optional.IsDefined(NCrossValidations)) + { + if (NCrossValidations != null) + { + writer.WritePropertyName("nCrossValidations"); + writer.WriteObjectValue(NCrossValidations); + } + else + { + writer.WriteNull("nCrossValidations"); + } + } + if (Optional.IsDefined(TestData)) + { + if (TestData != null) + { + writer.WritePropertyName("testData"); + writer.WriteObjectValue(TestData); + } + else + { + writer.WriteNull("testData"); + } + } + if (Optional.IsDefined(TestDataSize)) + { + if (TestDataSize != null) + { + writer.WritePropertyName("testDataSize"); + writer.WriteNumberValue(TestDataSize.Value); + } + else + { + writer.WriteNull("testDataSize"); + } + } + if (Optional.IsDefined(ValidationData)) + { + if (ValidationData != null) + { + writer.WritePropertyName("validationData"); + writer.WriteObjectValue(ValidationData); + } + else + { + writer.WriteNull("validationData"); + } + } + if (Optional.IsDefined(ValidationDataSize)) + { + if (ValidationDataSize != null) + { + writer.WritePropertyName("validationDataSize"); + writer.WriteNumberValue(ValidationDataSize.Value); + } + else + { + writer.WriteNull("validationDataSize"); + } + } + if (Optional.IsDefined(WeightColumnName)) + { + if (WeightColumnName != null) + { + writer.WritePropertyName("weightColumnName"); + writer.WriteStringValue(WeightColumnName); + } + else + { + writer.WriteNull("weightColumnName"); + } + } + if (Optional.IsDefined(LogVerbosity)) + { + writer.WritePropertyName("logVerbosity"); + writer.WriteStringValue(LogVerbosity.Value.ToString()); + } + if (Optional.IsDefined(TargetColumnName)) + { + if (TargetColumnName != null) + { + writer.WritePropertyName("targetColumnName"); + writer.WriteStringValue(TargetColumnName); + } + else + { + writer.WriteNull("targetColumnName"); + } + } + writer.WritePropertyName("taskType"); + writer.WriteStringValue(TaskType.ToString()); + writer.WritePropertyName("trainingData"); + writer.WriteObjectValue(TrainingData); + writer.WriteEndObject(); + } + + internal static ClassificationTask DeserializeClassificationTask(JsonElement element) + { + Optional positiveLabel = default; + Optional primaryMetric = default; + Optional trainingSettings = default; + Optional> cvSplitColumnNames = default; + Optional featurizationSettings = default; + Optional limitSettings = default; + Optional nCrossValidations = default; + Optional testData = default; + Optional testDataSize = default; + Optional validationData = default; + Optional validationDataSize = default; + Optional weightColumnName = default; + Optional logVerbosity = default; + Optional targetColumnName = default; + TaskType taskType = default; + MachineLearningTableJobInput trainingData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("positiveLabel")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + positiveLabel = null; + continue; + } + positiveLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("primaryMetric")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + primaryMetric = new ClassificationPrimaryMetric(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + trainingSettings = null; + continue; + } + trainingSettings = ClassificationTrainingSettings.DeserializeClassificationTrainingSettings(property.Value); + continue; + } + if (property.NameEquals("cvSplitColumnNames")) + { + 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")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + featurizationSettings = null; + continue; + } + featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); + continue; + } + if (property.NameEquals("limitSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + limitSettings = null; + continue; + } + limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value); + continue; + } + if (property.NameEquals("nCrossValidations")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nCrossValidations = null; + continue; + } + nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); + continue; + } + if (property.NameEquals("testData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + testData = null; + continue; + } + testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); + continue; + } + if (property.NameEquals("testDataSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + testDataSize = null; + continue; + } + testDataSize = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("validationData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + validationData = null; + continue; + } + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); + continue; + } + if (property.NameEquals("validationDataSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + validationDataSize = null; + continue; + } + validationDataSize = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("weightColumnName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + weightColumnName = null; + continue; + } + weightColumnName = property.Value.GetString(); + continue; + } + if (property.NameEquals("logVerbosity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); + continue; + } + if (property.NameEquals("targetColumnName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + targetColumnName = null; + continue; + } + targetColumnName = property.Value.GetString(); + continue; + } + if (property.NameEquals("taskType")) + { + taskType = new TaskType(property.Value.GetString()); + continue; + } + if (property.NameEquals("trainingData")) + { + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); + continue; + } + } + return new ClassificationTask(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, positiveLabel.Value, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs new file mode 100644 index 000000000000..49ec663bf3ec --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTask.cs @@ -0,0 +1,192 @@ +// 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 +{ + /// + /// Classification task in AutoML Table vertical. + /// Serialized Name: Classification + /// + public partial class ClassificationTask : AutoMLVertical + { + /// Initializes a new instance of ClassificationTask. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// is null. + public ClassificationTask(MachineLearningTableJobInput trainingData) : base(trainingData) + { + Argument.AssertNotNull(trainingData, nameof(trainingData)); + + CvSplitColumnNames = new ChangeTrackingList(); + TaskType = TaskType.Classification; + } + + /// Initializes a new instance of ClassificationTask. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// + /// + /// Target column name: This is prediction values column. + /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Positive label for binary metrics calculation. + /// Serialized Name: Classification.positiveLabel + /// + /// + /// Primary metric for the task. + /// Serialized Name: Classification.primaryMetric + /// + /// + /// Inputs for training phase for an AutoML Job. + /// Serialized Name: Classification.trainingSettings + /// + /// + /// Columns to use for CVSplit data. + /// Serialized Name: TableVertical.cvSplitColumnNames + /// + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: TableVertical.featurizationSettings + /// + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: TableVertical.limitSettings + /// + /// + /// Number of cross validation folds to be applied on training dataset + /// when validation dataset is not provided. + /// Serialized Name: TableVertical.nCrossValidations + /// Please note is the base class. According to the scenario, a derived class 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 . + /// + /// + /// Test data input. + /// Serialized Name: TableVertical.testData + /// + /// + /// 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. + /// Serialized Name: TableVertical.testDataSize + /// + /// + /// Validation data inputs. + /// Serialized Name: TableVertical.validationData + /// + /// + /// 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. + /// Serialized Name: TableVertical.validationDataSize + /// + /// + /// 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. + /// Serialized Name: TableVertical.weightColumnName + /// + internal ClassificationTask(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, 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) + { + PositiveLabel = positiveLabel; + PrimaryMetric = primaryMetric; + TrainingSettings = trainingSettings; + CvSplitColumnNames = cvSplitColumnNames; + FeaturizationSettings = featurizationSettings; + LimitSettings = limitSettings; + NCrossValidations = nCrossValidations; + TestData = testData; + TestDataSize = testDataSize; + ValidationData = validationData; + ValidationDataSize = validationDataSize; + WeightColumnName = weightColumnName; + TaskType = taskType; + } + + /// + /// Positive label for binary metrics calculation. + /// Serialized Name: Classification.positiveLabel + /// + public string PositiveLabel { get; set; } + /// + /// Primary metric for the task. + /// Serialized Name: Classification.primaryMetric + /// + public ClassificationPrimaryMetric? PrimaryMetric { get; set; } + /// + /// Inputs for training phase for an AutoML Job. + /// Serialized Name: Classification.trainingSettings + /// + public ClassificationTrainingSettings TrainingSettings { get; set; } + /// + /// Columns to use for CVSplit data. + /// Serialized Name: TableVertical.cvSplitColumnNames + /// + public IList CvSplitColumnNames { get; set; } + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: TableVertical.featurizationSettings + /// + public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: TableVertical.limitSettings + /// + public TableVerticalLimitSettings LimitSettings { get; set; } + /// + /// Number of cross validation folds to be applied on training dataset + /// when validation dataset is not provided. + /// Serialized Name: TableVertical.nCrossValidations + /// Please note is the base class. According to the scenario, a derived class 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 NCrossValidations NCrossValidations { get; set; } + /// + /// Test data input. + /// Serialized Name: TableVertical.testData + /// + public MachineLearningTableJobInput TestData { get; set; } + /// + /// 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. + /// Serialized Name: TableVertical.testDataSize + /// + public double? TestDataSize { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: TableVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } + /// + /// 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. + /// Serialized Name: TableVertical.validationDataSize + /// + 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. + /// Serialized Name: TableVertical.weightColumnName + /// + public string WeightColumnName { 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 c985dbf765f4..e28aaf062536 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 @@ -51,30 +51,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("blockedTrainingAlgorithms"); } } - if (Optional.IsDefined(EnableDnnTraining)) + if (Optional.IsDefined(IsDnnTrainingEnabled)) { writer.WritePropertyName("enableDnnTraining"); - writer.WriteBooleanValue(EnableDnnTraining.Value); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } - if (Optional.IsDefined(EnableModelExplainability)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { writer.WritePropertyName("enableModelExplainability"); - writer.WriteBooleanValue(EnableModelExplainability.Value); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); } - if (Optional.IsDefined(EnableOnnxCompatibleModels)) + if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"); - writer.WriteBooleanValue(EnableOnnxCompatibleModels.Value); + writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } - if (Optional.IsDefined(EnableStackEnsemble)) + if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"); - writer.WriteBooleanValue(EnableStackEnsemble.Value); + writer.WriteBooleanValue(IsStackEnsembleEnabled.Value); } - if (Optional.IsDefined(EnableVoteEnsemble)) + if (Optional.IsDefined(IsVoteEnsembleEnabled)) { writer.WritePropertyName("enableVoteEnsemble"); - writer.WriteBooleanValue(EnableVoteEnsemble.Value); + writer.WriteBooleanValue(IsVoteEnsembleEnabled.Value); } if (Optional.IsDefined(EnsembleModelDownloadTimeout)) { @@ -106,7 +106,7 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining Optional enableStackEnsemble = default; Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; - Optional stackEnsembleSettings = default; + Optional stackEnsembleSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("allowedTrainingAlgorithms")) @@ -206,7 +206,7 @@ internal static ClassificationTrainingSettings DeserializeClassificationTraining stackEnsembleSettings = null; continue; } - stackEnsembleSettings = StackEnsembleSettings.DeserializeStackEnsembleSettings(property.Value); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } } 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 d43a1ba25e63..20d01656ba3f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClassificationTrainingSettings.cs @@ -11,8 +11,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Classification Training related configuration. - public partial class ClassificationTrainingSettings : TrainingSettings + /// + /// Classification Training related configuration. + /// Serialized Name: ClassificationTrainingSettings + /// + public partial class ClassificationTrainingSettings : MachineLearningTrainingSettings { /// Initializes a new instance of ClassificationTrainingSettings. public ClassificationTrainingSettings() @@ -22,27 +25,58 @@ public ClassificationTrainingSettings() } /// Initializes a new instance of ClassificationTrainingSettings. - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. - /// Flag for enabling onnx compatible models. - /// Enable stack ensemble run. - /// Enable voting ensemble run. + /// + /// Enable recommendation of DNN models. + /// Serialized Name: TrainingSettings.enableDnnTraining + /// + /// + /// Flag to turn on explainability on best model. + /// Serialized Name: TrainingSettings.enableModelExplainability + /// + /// + /// Flag for enabling onnx compatible models. + /// Serialized Name: TrainingSettings.enableOnnxCompatibleModels + /// + /// + /// Enable stack ensemble run. + /// Serialized Name: TrainingSettings.enableStackEnsemble + /// + /// + /// Enable voting ensemble run. + /// Serialized Name: TrainingSettings.enableVoteEnsemble + /// /// /// 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. + /// Serialized Name: TrainingSettings.ensembleModelDownloadTimeout + /// + /// + /// Stack ensemble settings for stack ensemble run. + /// Serialized Name: TrainingSettings.stackEnsembleSettings + /// + /// + /// Allowed models for classification task. + /// Serialized Name: ClassificationTrainingSettings.allowedTrainingAlgorithms + /// + /// + /// Blocked models for classification task. + /// Serialized Name: ClassificationTrainingSettings.blockedTrainingAlgorithms /// - /// Stack ensemble settings for stack ensemble run. - /// Allowed models for classification task. - /// Blocked models for classification task. - internal ClassificationTrainingSettings(bool? enableDnnTraining, bool? enableModelExplainability, bool? enableOnnxCompatibleModels, bool? enableStackEnsemble, bool? enableVoteEnsemble, TimeSpan? ensembleModelDownloadTimeout, StackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(enableDnnTraining, enableModelExplainability, enableOnnxCompatibleModels, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, stackEnsembleSettings) + internal ClassificationTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; } - /// Allowed models for classification task. + /// + /// Allowed models for classification task. + /// Serialized Name: ClassificationTrainingSettings.allowedTrainingAlgorithms + /// public IList AllowedTrainingAlgorithms { get; set; } - /// Blocked models for classification task. + /// + /// Blocked models for classification task. + /// Serialized Name: ClassificationTrainingSettings.blockedTrainingAlgorithms + /// public IList BlockedTrainingAlgorithms { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClusterPurpose.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClusterPurpose.cs deleted file mode 100644 index 47b97e28735d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ClusterPurpose.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 -{ - /// Intended usage of the cluster. - public readonly partial struct ClusterPurpose : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ClusterPurpose(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FastProdValue = "FastProd"; - private const string DenseProdValue = "DenseProd"; - private const string DevTestValue = "DevTest"; - - /// FastProd. - public static ClusterPurpose FastProd { get; } = new ClusterPurpose(FastProdValue); - /// DenseProd. - public static ClusterPurpose DenseProd { get; } = new ClusterPurpose(DenseProdValue); - /// DevTest. - public static ClusterPurpose DevTest { get; } = new ClusterPurpose(DevTestValue); - /// Determines if two values are the same. - public static bool operator ==(ClusterPurpose left, ClusterPurpose right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ClusterPurpose left, ClusterPurpose right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ClusterPurpose(string value) => new ClusterPurpose(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ClusterPurpose other && Equals(other); - /// - public bool Equals(ClusterPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeConfiguration.Serialization.cs deleted file mode 100644 index 21c521ff28a0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeConfiguration.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CodeConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CodeId)) - { - if (CodeId != null) - { - writer.WritePropertyName("codeId"); - writer.WriteStringValue(CodeId); - } - else - { - writer.WriteNull("codeId"); - } - } - writer.WritePropertyName("scoringScript"); - writer.WriteStringValue(ScoringScript); - writer.WriteEndObject(); - } - - internal static CodeConfiguration DeserializeCodeConfiguration(JsonElement element) - { - Optional codeId = default; - string scoringScript = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("codeId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeId = null; - continue; - } - codeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("scoringScript")) - { - scoringScript = property.Value.GetString(); - continue; - } - } - return new CodeConfiguration(codeId.Value, scoringScript); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeConfiguration.cs deleted file mode 100644 index b8babb25a2d9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeConfiguration.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Configuration for a scoring code asset. - public partial class CodeConfiguration - { - /// Initializes a new instance of CodeConfiguration. - /// [Required] The script to execute on startup. eg. "score.py". - /// is null. - public CodeConfiguration(string scoringScript) - { - Argument.AssertNotNull(scoringScript, nameof(scoringScript)); - - ScoringScript = scoringScript; - } - - /// Initializes a new instance of CodeConfiguration. - /// ARM resource ID of the code asset. - /// [Required] The script to execute on startup. eg. "score.py". - internal CodeConfiguration(string codeId, string scoringScript) - { - CodeId = codeId; - ScoringScript = scoringScript; - } - - /// ARM resource ID of the code asset. - public string CodeId { get; set; } - /// [Required] The script to execute on startup. eg. "score.py". - public string ScoringScript { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerData.Serialization.cs deleted file mode 100644 index 992783313434..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class CodeContainerData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static CodeContainerData DeserializeCodeContainerData(JsonElement element) - { - CodeContainerProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = CodeContainerProperties.DeserializeCodeContainerProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new CodeContainerData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerProperties.Serialization.cs deleted file mode 100644 index 852de52ad33e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerProperties.Serialization.cs +++ /dev/null @@ -1,173 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CodeContainerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static CodeContainerProperties DeserializeCodeContainerProperties(JsonElement element) - { - Optional isArchived = default; - Optional latestVersion = default; - Optional nextVersion = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("latestVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - latestVersion = null; - continue; - } - latestVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nextVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nextVersion = null; - continue; - } - nextVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new CodeContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerProperties.cs deleted file mode 100644 index 95f44da6741c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerProperties.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Container for code asset versions. - public partial class CodeContainerProperties : AssetContainer - { - /// Initializes a new instance of CodeContainerProperties. - public CodeContainerProperties() - { - } - - /// Initializes a new instance of CodeContainerProperties. - /// 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. - internal CodeContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) - { - } - } -} 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 ab7cae7c24f2..a51df4a9a1e5 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 @@ -17,7 +17,7 @@ internal partial class CodeContainerResourceArmPaginatedResult internal static CodeContainerResourceArmPaginatedResult DeserializeCodeContainerResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static CodeContainerResourceArmPaginatedResult DeserializeCodeContainer property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CodeContainerData.DeserializeCodeContainerData(item)); + array.Add(MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(item)); } value = array; continue; 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 edaa2ce3612b..9d836ff65e63 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeContainerResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of CodeContainer entities. + /// + /// A paginated list of CodeContainer entities. + /// Serialized Name: CodeContainerResourceArmPaginatedResult + /// internal partial class CodeContainerResourceArmPaginatedResult { /// Initializes a new instance of CodeContainerResourceArmPaginatedResult. internal CodeContainerResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of CodeContainerResourceArmPaginatedResult. - /// The link to the next page of CodeContainer objects. If null, there are no additional pages. - /// An array of objects of type CodeContainer. - internal CodeContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of CodeContainer objects. If null, there are no additional pages. + /// Serialized Name: CodeContainerResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type CodeContainer. + /// Serialized Name: CodeContainerResourceArmPaginatedResult.value + /// + internal CodeContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of CodeContainer objects. If null, there are no additional pages. + /// + /// The link to the next page of CodeContainer objects. If null, there are no additional pages. + /// Serialized Name: CodeContainerResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type CodeContainer. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type CodeContainer. + /// Serialized Name: CodeContainerResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionData.Serialization.cs deleted file mode 100644 index 2b8445d829b6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class CodeVersionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static CodeVersionData DeserializeCodeVersionData(JsonElement element) - { - CodeVersionProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = CodeVersionProperties.DeserializeCodeVersionProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new CodeVersionData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionProperties.Serialization.cs deleted file mode 100644 index dde2904aea68..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionProperties.Serialization.cs +++ /dev/null @@ -1,191 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CodeVersionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CodeUri)) - { - if (CodeUri != null) - { - writer.WritePropertyName("codeUri"); - writer.WriteStringValue(CodeUri.AbsoluteUri); - } - else - { - writer.WriteNull("codeUri"); - } - } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static CodeVersionProperties DeserializeCodeVersionProperties(JsonElement element) - { - Optional codeUri = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("codeUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeUri = null; - continue; - } - codeUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new CodeVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), codeUri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionProperties.cs deleted file mode 100644 index f89c918aefce..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionProperties.cs +++ /dev/null @@ -1,36 +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 -{ - /// Code asset version details. - public partial class CodeVersionProperties : AssetBase - { - /// Initializes a new instance of CodeVersionProperties. - public CodeVersionProperties() - { - } - - /// Initializes a new instance of CodeVersionProperties. - /// 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. - internal CodeVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, Uri codeUri) : base(description, properties, tags, isAnonymous, isArchived) - { - CodeUri = codeUri; - } - - /// Uri where code is located. - public Uri CodeUri { get; set; } - } -} 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 8c49f9a67c00..f707dae22365 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 @@ -17,7 +17,7 @@ internal partial class CodeVersionResourceArmPaginatedResult internal static CodeVersionResourceArmPaginatedResult DeserializeCodeVersionResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static CodeVersionResourceArmPaginatedResult DeserializeCodeVersionReso property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(CodeVersionData.DeserializeCodeVersionData(item)); + array.Add(MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(item)); } value = array; continue; 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 346ceae1ea56..fc211e029004 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CodeVersionResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of CodeVersion entities. + /// + /// A paginated list of CodeVersion entities. + /// Serialized Name: CodeVersionResourceArmPaginatedResult + /// internal partial class CodeVersionResourceArmPaginatedResult { /// Initializes a new instance of CodeVersionResourceArmPaginatedResult. internal CodeVersionResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of CodeVersionResourceArmPaginatedResult. - /// The link to the next page of CodeVersion objects. If null, there are no additional pages. - /// An array of objects of type CodeVersion. - internal CodeVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of CodeVersion objects. If null, there are no additional pages. + /// Serialized Name: CodeVersionResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type CodeVersion. + /// Serialized Name: CodeVersionResourceArmPaginatedResult.value + /// + internal CodeVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of CodeVersion objects. If null, there are no additional pages. + /// + /// The link to the next page of CodeVersion objects. If null, there are no additional pages. + /// Serialized Name: CodeVersionResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type CodeVersion. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type CodeVersion. + /// Serialized Name: CodeVersionResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ColumnTransformer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ColumnTransformer.cs index 8145d954dd03..569740dc1432 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ColumnTransformer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ColumnTransformer.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Column transformer parameters. + /// + /// Column transformer parameters. + /// Serialized Name: ColumnTransformer + /// public partial class ColumnTransformer { /// Initializes a new instance of ColumnTransformer. @@ -21,10 +24,14 @@ public ColumnTransformer() } /// Initializes a new instance of ColumnTransformer. - /// Fields to apply transformer logic on. + /// + /// Fields to apply transformer logic on. + /// Serialized Name: ColumnTransformer.fields + /// /// /// Different properties to be passed to transformer. /// Input expected is dictionary of key,value pairs in JSON format. + /// Serialized Name: ColumnTransformer.parameters /// internal ColumnTransformer(IList fields, BinaryData parameters) { @@ -32,11 +39,15 @@ internal ColumnTransformer(IList fields, BinaryData parameters) Parameters = parameters; } - /// Fields to apply transformer logic on. + /// + /// Fields to apply transformer logic on. + /// Serialized Name: ColumnTransformer.fields + /// public IList Fields { get; set; } /// /// Different properties to be passed to transformer. /// Input expected is dictionary of key,value pairs in JSON format. + /// Serialized Name: ColumnTransformer.parameters /// /// To assign an object to this property use . /// diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJob.Serialization.cs deleted file mode 100644 index 85b0abf6eabb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJob.Serialization.cs +++ /dev/null @@ -1,550 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CommandJob : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CodeId)) - { - if (CodeId != null) - { - writer.WritePropertyName("codeId"); - writer.WriteStringValue(CodeId); - } - else - { - writer.WriteNull("codeId"); - } - } - writer.WritePropertyName("command"); - writer.WriteStringValue(Command); - if (Optional.IsDefined(Distribution)) - { - if (Distribution != null) - { - writer.WritePropertyName("distribution"); - writer.WriteObjectValue(Distribution); - } - else - { - writer.WriteNull("distribution"); - } - } - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - if (EnvironmentVariables != null) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("environmentVariables"); - } - } - if (Optional.IsCollectionDefined(Inputs)) - { - if (Inputs != null) - { - writer.WritePropertyName("inputs"); - writer.WriteStartObject(); - foreach (var item in Inputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("inputs"); - } - } - if (Optional.IsDefined(Limits)) - { - if (Limits != null) - { - writer.WritePropertyName("limits"); - writer.WriteObjectValue(Limits); - } - else - { - writer.WriteNull("limits"); - } - } - if (Optional.IsCollectionDefined(Outputs)) - { - if (Outputs != null) - { - writer.WritePropertyName("outputs"); - writer.WriteStartObject(); - foreach (var item in Outputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("outputs"); - } - } - if (Optional.IsDefined(Resources)) - { - writer.WritePropertyName("resources"); - writer.WriteObjectValue(Resources); - } - if (Optional.IsDefined(ComponentId)) - { - if (ComponentId != null) - { - writer.WritePropertyName("componentId"); - writer.WriteStringValue(ComponentId); - } - else - { - writer.WriteNull("componentId"); - } - } - if (Optional.IsDefined(ComputeId)) - { - if (ComputeId != null) - { - writer.WritePropertyName("computeId"); - writer.WriteStringValue(ComputeId); - } - else - { - writer.WriteNull("computeId"); - } - } - if (Optional.IsDefined(DisplayName)) - { - if (DisplayName != null) - { - writer.WritePropertyName("displayName"); - writer.WriteStringValue(DisplayName); - } - else - { - writer.WriteNull("displayName"); - } - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsCollectionDefined(Services)) - { - if (Services != null) - { - writer.WritePropertyName("services"); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("services"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static CommandJob DeserializeCommandJob(JsonElement element) - { - Optional codeId = default; - string command = default; - Optional distribution = default; - string environmentId = default; - Optional> environmentVariables = default; - Optional> inputs = default; - Optional limits = default; - Optional> outputs = default; - Optional parameters = default; - Optional resources = default; - Optional componentId = default; - Optional computeId = default; - Optional displayName = default; - Optional experimentName = default; - Optional identity = default; - Optional isArchived = default; - JobType jobType = default; - Optional> services = default; - Optional status = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("codeId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeId = null; - continue; - } - codeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("command")) - { - command = property.Value.GetString(); - continue; - } - if (property.NameEquals("distribution")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - distribution = null; - continue; - } - distribution = DistributionConfiguration.DeserializeDistributionConfiguration(property.Value); - continue; - } - if (property.NameEquals("environmentId")) - { - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentVariables = 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, property0.Value.GetString()); - } - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("inputs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - inputs = 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, JobInput.DeserializeJobInput(property0.Value)); - } - } - inputs = dictionary; - continue; - } - if (property.NameEquals("limits")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - limits = null; - continue; - } - limits = CommandJobLimits.DeserializeCommandJobLimits(property.Value); - continue; - } - if (property.NameEquals("outputs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - outputs = 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, JobOutput.DeserializeJobOutput(property0.Value)); - } - } - outputs = dictionary; - continue; - } - if (property.NameEquals("parameters")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - parameters = null; - continue; - } - parameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("resources")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - resources = JobResourceConfiguration.DeserializeJobResourceConfiguration(property.Value); - continue; - } - if (property.NameEquals("componentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentId = null; - continue; - } - componentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - computeId = null; - continue; - } - computeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - displayName = null; - continue; - } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = IdentityConfiguration.DeserializeIdentityConfiguration(property.Value); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("services")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - services = 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, JobService.DeserializeJobService(property0.Value)); - } - } - services = dictionary; - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new JobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new CommandJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), codeId.Value, command, distribution.Value, environmentId, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(inputs), limits.Value, Optional.ToDictionary(outputs), parameters.Value, resources.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJob.cs deleted file mode 100644 index 3c35338f35fa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJob.cs +++ /dev/null @@ -1,154 +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 -{ - /// Command job definition. - public partial class CommandJob : MachineLearningJobProperties - { - /// Initializes a new instance of CommandJob. - /// [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. - /// or is null. - public CommandJob(string command, string environmentId) - { - Argument.AssertNotNull(command, nameof(command)); - Argument.AssertNotNull(environmentId, nameof(environmentId)); - - Command = command; - EnvironmentId = environmentId; - EnvironmentVariables = new ChangeTrackingDictionary(); - Inputs = new ChangeTrackingDictionary(); - Outputs = new ChangeTrackingDictionary(); - JobType = JobType.Command; - } - - /// Initializes a new instance of CommandJob. - /// 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?. - /// [Required] Specifies the type of 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. - /// Compute Resource configuration for the job. - internal CommandJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, IdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, JobStatus? status, string codeId, string command, DistributionConfiguration distribution, string environmentId, IDictionary environmentVariables, IDictionary inputs, CommandJobLimits limits, IDictionary outputs, BinaryData parameters, JobResourceConfiguration resources) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) - { - CodeId = codeId; - Command = command; - Distribution = distribution; - EnvironmentId = environmentId; - EnvironmentVariables = environmentVariables; - Inputs = inputs; - Limits = limits; - Outputs = outputs; - Parameters = parameters; - Resources = resources; - JobType = jobType; - } - - /// ARM resource ID of the code asset. - public string 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 DistributionConfiguration Distribution { get; set; } - /// [Required] The ARM resource ID of the Environment specification for the job. - public string 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 CommandJobLimits 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. - /// The available derived classes include , , , , and . - /// - public IDictionary Outputs { get; set; } - /// - /// Input parameters. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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 Parameters { get; } - /// Compute Resource configuration for the job. - public JobResourceConfiguration Resources { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJobLimits.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJobLimits.Serialization.cs deleted file mode 100644 index ea8bfc58a82b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJobLimits.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CommandJobLimits : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("jobLimitsType"); - writer.WriteStringValue(JobLimitsType.ToString()); - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - writer.WriteEndObject(); - } - - internal static CommandJobLimits DeserializeCommandJobLimits(JsonElement element) - { - JobLimitsType jobLimitsType = default; - Optional timeout = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("jobLimitsType")) - { - jobLimitsType = new JobLimitsType(property.Value.GetString()); - continue; - } - if (property.NameEquals("timeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - timeout = null; - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - } - return new CommandJobLimits(jobLimitsType, Optional.ToNullable(timeout)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJobLimits.cs deleted file mode 100644 index 382f5d7dad1e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CommandJobLimits.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Command Job limit class. - public partial class CommandJobLimits : JobLimits - { - /// Initializes a new instance of CommandJobLimits. - public CommandJobLimits() - { - JobLimitsType = JobLimitsType.Command; - } - - /// Initializes a new instance of CommandJobLimits. - /// [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. - internal CommandJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout) : base(jobLimitsType, timeout) - { - JobLimitsType = jobLimitsType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerData.Serialization.cs deleted file mode 100644 index 9ba0cab0c920..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class ComponentContainerData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ComponentContainerData DeserializeComponentContainerData(JsonElement element) - { - ComponentContainerProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = ComponentContainerProperties.DeserializeComponentContainerProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new ComponentContainerData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerProperties.Serialization.cs deleted file mode 100644 index fb544b10734a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerProperties.Serialization.cs +++ /dev/null @@ -1,173 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComponentContainerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static ComponentContainerProperties DeserializeComponentContainerProperties(JsonElement element) - { - Optional isArchived = default; - Optional latestVersion = default; - Optional nextVersion = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("latestVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - latestVersion = null; - continue; - } - latestVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nextVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nextVersion = null; - continue; - } - nextVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new ComponentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerProperties.cs deleted file mode 100644 index a6a9a3979679..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerProperties.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Component container definition. - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> - /// - public partial class ComponentContainerProperties : AssetContainer - { - /// Initializes a new instance of ComponentContainerProperties. - public ComponentContainerProperties() - { - } - - /// Initializes a new instance of ComponentContainerProperties. - /// 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. - internal ComponentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) - { - } - } -} 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 41899f731eb1..0d9481ef0d45 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 @@ -17,7 +17,7 @@ internal partial class ComponentContainerResourceArmPaginatedResult internal static ComponentContainerResourceArmPaginatedResult DeserializeComponentContainerResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static ComponentContainerResourceArmPaginatedResult DeserializeComponen property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ComponentContainerData.DeserializeComponentContainerData(item)); + array.Add(MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(item)); } value = array; continue; 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 04d5a02c806a..5bebd648798f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentContainerResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of ComponentContainer entities. + /// + /// A paginated list of ComponentContainer entities. + /// Serialized Name: ComponentContainerResourceArmPaginatedResult + /// internal partial class ComponentContainerResourceArmPaginatedResult { /// Initializes a new instance of ComponentContainerResourceArmPaginatedResult. internal ComponentContainerResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ComponentContainerResourceArmPaginatedResult. - /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. - /// An array of objects of type ComponentContainer. - internal ComponentContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. + /// Serialized Name: ComponentContainerResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type ComponentContainer. + /// Serialized Name: ComponentContainerResourceArmPaginatedResult.value + /// + internal ComponentContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. + /// + /// The link to the next page of ComponentContainer objects. If null, there are no additional pages. + /// Serialized Name: ComponentContainerResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type ComponentContainer. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type ComponentContainer. + /// Serialized Name: ComponentContainerResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionData.Serialization.cs deleted file mode 100644 index 98680942cb27..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class ComponentVersionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ComponentVersionData DeserializeComponentVersionData(JsonElement element) - { - ComponentVersionProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = ComponentVersionProperties.DeserializeComponentVersionProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new ComponentVersionData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionProperties.Serialization.cs deleted file mode 100644 index b2fe473a787a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionProperties.Serialization.cs +++ /dev/null @@ -1,195 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComponentVersionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ComponentSpec)) - { - if (ComponentSpec != null) - { - writer.WritePropertyName("componentSpec"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ComponentSpec); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(ComponentSpec.ToString()).RootElement); -#endif - } - else - { - writer.WriteNull("componentSpec"); - } - } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static ComponentVersionProperties DeserializeComponentVersionProperties(JsonElement element) - { - Optional componentSpec = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("componentSpec")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentSpec = null; - continue; - } - componentSpec = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new ComponentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), componentSpec.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionProperties.cs deleted file mode 100644 index 822008e7d878..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionProperties.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 -{ - /// Definition of a component version: defines resources that span component types. - public partial class ComponentVersionProperties : AssetBase - { - /// Initializes a new instance of ComponentVersionProperties. - public ComponentVersionProperties() - { - } - - /// Initializes a new instance of ComponentVersionProperties. - /// 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" /> - /// - internal ComponentVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, BinaryData componentSpec) : base(description, properties, tags, isAnonymous, isArchived) - { - ComponentSpec = componentSpec; - } - - /// - /// Defines Component definition details. - /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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 ComponentSpec { get; set; } - } -} 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 9c8bba34df86..c308b7579c43 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 @@ -17,7 +17,7 @@ internal partial class ComponentVersionResourceArmPaginatedResult internal static ComponentVersionResourceArmPaginatedResult DeserializeComponentVersionResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static ComponentVersionResourceArmPaginatedResult DeserializeComponentV property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ComponentVersionData.DeserializeComponentVersionData(item)); + array.Add(MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(item)); } value = array; continue; 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 b5a702dd88e0..ddd9677d8d82 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComponentVersionResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of ComponentVersion entities. + /// + /// A paginated list of ComponentVersion entities. + /// Serialized Name: ComponentVersionResourceArmPaginatedResult + /// internal partial class ComponentVersionResourceArmPaginatedResult { /// Initializes a new instance of ComponentVersionResourceArmPaginatedResult. internal ComponentVersionResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ComponentVersionResourceArmPaginatedResult. - /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. - /// An array of objects of type ComponentVersion. - internal ComponentVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. + /// Serialized Name: ComponentVersionResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type ComponentVersion. + /// Serialized Name: ComponentVersionResourceArmPaginatedResult.value + /// + internal ComponentVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. + /// + /// The link to the next page of ComponentVersion objects. If null, there are no additional pages. + /// Serialized Name: ComponentVersionResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type ComponentVersion. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type ComponentVersion. + /// Serialized Name: ComponentVersionResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Compute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Compute.Serialization.cs deleted file mode 100644 index 3132322c69a1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Compute.Serialization.cs +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Compute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static Compute DeserializeCompute(JsonElement element) - { - if (element.TryGetProperty("computeType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AKS": return AksCompute.DeserializeAksCompute(element); - case "AmlCompute": return AmlCompute.DeserializeAmlCompute(element); - case "ComputeInstance": return ComputeInstance.DeserializeComputeInstance(element); - case "DataFactory": return DataFactoryCompute.DeserializeDataFactoryCompute(element); - case "DataLakeAnalytics": return DataLakeAnalyticsCompute.DeserializeDataLakeAnalyticsCompute(element); - case "Databricks": return DatabricksCompute.DeserializeDatabricksCompute(element); - case "HDInsight": return HDInsightCompute.DeserializeHDInsightCompute(element); - case "Kubernetes": return KubernetesCompute.DeserializeKubernetesCompute(element); - case "SynapseSpark": return SynapseSparkCompute.DeserializeSynapseSparkCompute(element); - case "VirtualMachine": return VirtualMachineCompute.DeserializeVirtualMachineCompute(element); - } - } - return UnknownCompute.DeserializeUnknownCompute(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Compute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Compute.cs deleted file mode 100644 index 021c4a5adf40..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Compute.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; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Machine Learning compute object. - /// Please note is the base class. According to the scenario, a derived class 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 Compute - { - /// Initializes a new instance of Compute. - protected Compute() - { - ProvisioningErrors = new ChangeTrackingList(); - } - - /// Initializes a new instance of Compute. - /// 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. - internal Compute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) - { - ComputeType = computeType; - ComputeLocation = computeLocation; - ProvisioningState = provisioningState; - Description = description; - CreatedOn = createdOn; - ModifiedOn = modifiedOn; - ResourceId = resourceId; - ProvisioningErrors = provisioningErrors; - IsAttachedCompute = isAttachedCompute; - DisableLocalAuth = disableLocalAuth; - } - - /// The type of compute. - internal ComputeType ComputeType { get; set; } - /// Location for the underlying compute. - public string ComputeLocation { get; set; } - /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. - public ProvisioningState? ProvisioningState { get; } - /// The description of the Machine Learning compute. - public string Description { get; set; } - /// The time at which the compute was created. - public DateTimeOffset? CreatedOn { get; } - /// The time at which the compute was last modified. - public DateTimeOffset? ModifiedOn { get; } - /// ARM resource id of the underlying compute. - public ResourceIdentifier ResourceId { get; set; } - /// Errors during provisioning. - public IReadOnlyList ProvisioningErrors { get; } - /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. - public bool? IsAttachedCompute { get; } - /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. - public bool? DisableLocalAuth { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstance.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstance.Serialization.cs deleted file mode 100644 index 5f3a27bbfd0e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstance.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstance : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static ComputeInstance DeserializeComputeInstance(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = ComputeInstanceProperties.DeserializeComputeInstanceProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new ComputeInstance(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstance.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstance.cs deleted file mode 100644 index 1a5089b3d3d3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstance.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 -{ - /// An Azure Machine Learning compute instance. - public partial class ComputeInstance : Compute - { - /// Initializes a new instance of ComputeInstance. - public ComputeInstance() - { - ComputeType = ComputeType.ComputeInstance; - } - - /// Initializes a new instance of ComputeInstance. - /// 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. - /// Properties of ComputeInstance. - internal ComputeInstance(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, ComputeInstanceProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// Properties of ComputeInstance. - public ComputeInstanceProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceApplication.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceApplication.Serialization.cs deleted file mode 100644 index ea8f31828eb8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceApplication.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceApplication - { - internal static ComputeInstanceApplication DeserializeComputeInstanceApplication(JsonElement element) - { - Optional displayName = default; - Optional endpointUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("displayName")) - { - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpointUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - endpointUri = null; - continue; - } - endpointUri = new Uri(property.Value.GetString()); - continue; - } - } - return new ComputeInstanceApplication(displayName.Value, endpointUri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceApplication.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceApplication.cs deleted file mode 100644 index 0ee9699e3870..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceApplication.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Defines an Aml Instance application and its connectivity endpoint URI. - public partial class ComputeInstanceApplication - { - /// Initializes a new instance of ComputeInstanceApplication. - internal ComputeInstanceApplication() - { - } - - /// Initializes a new instance of ComputeInstanceApplication. - /// Name of the ComputeInstance application. - /// Application' endpoint URI. - internal ComputeInstanceApplication(string displayName, Uri endpointUri) - { - DisplayName = displayName; - EndpointUri = endpointUri; - } - - /// Name of the ComputeInstance application. - public string DisplayName { get; } - /// Application' endpoint URI. - public Uri EndpointUri { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAuthorizationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAuthorizationType.cs deleted file mode 100644 index 53b42c73d89c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceAuthorizationType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The Compute Instance Authorization type. Available values are personal (default). - public readonly partial struct ComputeInstanceAuthorizationType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ComputeInstanceAuthorizationType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PersonalValue = "personal"; - - /// personal. - public static ComputeInstanceAuthorizationType Personal { get; } = new ComputeInstanceAuthorizationType(PersonalValue); - /// Determines if two values are the same. - public static bool operator ==(ComputeInstanceAuthorizationType left, ComputeInstanceAuthorizationType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ComputeInstanceAuthorizationType left, ComputeInstanceAuthorizationType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ComputeInstanceAuthorizationType(string value) => new ComputeInstanceAuthorizationType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ComputeInstanceAuthorizationType other && Equals(other); - /// - public bool Equals(ComputeInstanceAuthorizationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs deleted file mode 100644 index b97735d095fa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceConnectivityEndpoints.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceConnectivityEndpoints - { - internal static ComputeInstanceConnectivityEndpoints DeserializeComputeInstanceConnectivityEndpoints(JsonElement element) - { - Optional publicIPAddress = default; - Optional privateIPAddress = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("publicIpAddress")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - publicIPAddress = null; - continue; - } - publicIPAddress = property.Value.GetString(); - continue; - } - if (property.NameEquals("privateIpAddress")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - privateIPAddress = null; - continue; - } - privateIPAddress = property.Value.GetString(); - continue; - } - } - return new ComputeInstanceConnectivityEndpoints(publicIPAddress.Value, privateIPAddress.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs deleted file mode 100644 index 853692c70967..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceConnectivityEndpoints.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Defines all connectivity endpoints and properties for an ComputeInstance. - public partial class ComputeInstanceConnectivityEndpoints - { - /// Initializes a new instance of ComputeInstanceConnectivityEndpoints. - internal ComputeInstanceConnectivityEndpoints() - { - } - - /// Initializes a new instance of ComputeInstanceConnectivityEndpoints. - /// Public IP Address of this ComputeInstance. - /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). - internal ComputeInstanceConnectivityEndpoints(string publicIPAddress, string privateIPAddress) - { - PublicIPAddress = publicIPAddress; - PrivateIPAddress = privateIPAddress; - } - - /// Public IP Address of this ComputeInstance. - public string PublicIPAddress { get; } - /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). - public string PrivateIPAddress { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceContainer.Serialization.cs deleted file mode 100644 index 7b8783a3bc18..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceContainer.Serialization.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; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceContainer - { - internal static ComputeInstanceContainer DeserializeComputeInstanceContainer(JsonElement element) - { - Optional name = default; - Optional autosave = default; - Optional gpu = default; - Optional network = default; - Optional environment = default; - Optional> services = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("autosave")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autosave = new Autosave(property.Value.GetString()); - continue; - } - if (property.NameEquals("gpu")) - { - gpu = property.Value.GetString(); - continue; - } - if (property.NameEquals("network")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - network = new Network(property.Value.GetString()); - continue; - } - if (property.NameEquals("environment")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environment = ComputeInstanceEnvironmentInfo.DeserializeComputeInstanceEnvironmentInfo(property.Value); - continue; - } - if (property.NameEquals("services")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - services = array; - continue; - } - } - return new ComputeInstanceContainer(name.Value, Optional.ToNullable(autosave), gpu.Value, Optional.ToNullable(network), environment.Value, Optional.ToList(services)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceContainer.cs deleted file mode 100644 index 52cc64b34935..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceContainer.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; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Defines an Aml Instance container. - public partial class ComputeInstanceContainer - { - /// Initializes a new instance of ComputeInstanceContainer. - internal ComputeInstanceContainer() - { - Services = new ChangeTrackingList(); - } - - /// Initializes a new instance of ComputeInstanceContainer. - /// Name of the ComputeInstance container. - /// Auto save settings. - /// Information of GPU. - /// network of this container. - /// Environment information of this container. - /// services of this containers. - internal ComputeInstanceContainer(string name, Autosave? autosave, string gpu, Network? network, ComputeInstanceEnvironmentInfo environment, IReadOnlyList services) - { - Name = name; - Autosave = autosave; - Gpu = gpu; - Network = network; - Environment = environment; - Services = services; - } - - /// Name of the ComputeInstance container. - public string Name { get; } - /// Auto save settings. - public Autosave? Autosave { get; } - /// Information of GPU. - public string Gpu { get; } - /// network of this container. - public Network? Network { get; } - /// Environment information of this container. - public ComputeInstanceEnvironmentInfo Environment { get; } - /// - /// services of this containers. - /// - /// To assign an object to the element of this property use . - /// - /// - /// To assign an already formated 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 IReadOnlyList Services { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs deleted file mode 100644 index 189e4092a4d5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceCreatedBy.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceCreatedBy - { - internal static ComputeInstanceCreatedBy DeserializeComputeInstanceCreatedBy(JsonElement element) - { - Optional userName = default; - Optional userOrgId = default; - Optional userId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - userName = null; - continue; - } - userName = property.Value.GetString(); - continue; - } - if (property.NameEquals("userOrgId")) - { - userOrgId = property.Value.GetString(); - continue; - } - if (property.NameEquals("userId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - userId = null; - continue; - } - userId = property.Value.GetString(); - continue; - } - } - return new ComputeInstanceCreatedBy(userName.Value, userOrgId.Value, userId.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceCreatedBy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceCreatedBy.cs deleted file mode 100644 index 1be376307062..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceCreatedBy.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Describes information on user who created this ComputeInstance. - public partial class ComputeInstanceCreatedBy - { - /// Initializes a new instance of ComputeInstanceCreatedBy. - internal ComputeInstanceCreatedBy() - { - } - - /// Initializes a new instance of ComputeInstanceCreatedBy. - /// Name of the user. - /// Uniquely identifies user' Azure Active Directory organization. - /// Uniquely identifies the user within his/her organization. - internal ComputeInstanceCreatedBy(string userName, string userOrgId, string userId) - { - UserName = userName; - UserOrgId = userOrgId; - UserId = userId; - } - - /// Name of the user. - public string UserName { get; } - /// Uniquely identifies user' Azure Active Directory organization. - public string UserOrgId { get; } - /// Uniquely identifies the user within his/her organization. - public string UserId { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataDisk.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataDisk.Serialization.cs deleted file mode 100644 index 1d4d4a31a5c3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataDisk.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceDataDisk - { - internal static ComputeInstanceDataDisk DeserializeComputeInstanceDataDisk(JsonElement element) - { - Optional caching = default; - Optional diskSizeGB = default; - Optional lun = default; - Optional storageAccountType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("caching")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - caching = new Caching(property.Value.GetString()); - continue; - } - if (property.NameEquals("diskSizeGB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - diskSizeGB = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("lun")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - lun = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("storageAccountType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - storageAccountType = new StorageAccountType(property.Value.GetString()); - continue; - } - } - return new ComputeInstanceDataDisk(Optional.ToNullable(caching), Optional.ToNullable(diskSizeGB), Optional.ToNullable(lun), Optional.ToNullable(storageAccountType)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataDisk.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataDisk.cs deleted file mode 100644 index 22427660fa0c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataDisk.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Defines an Aml Instance DataDisk. - public partial class ComputeInstanceDataDisk - { - /// Initializes a new instance of ComputeInstanceDataDisk. - internal ComputeInstanceDataDisk() - { - } - - /// Initializes a new instance of ComputeInstanceDataDisk. - /// Caching type of Data Disk. - /// The initial disk size in gigabytes. - /// The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. - /// type of this storage account. - internal ComputeInstanceDataDisk(Caching? caching, int? diskSizeGB, int? lun, StorageAccountType? storageAccountType) - { - Caching = caching; - DiskSizeGB = diskSizeGB; - Lun = lun; - StorageAccountType = storageAccountType; - } - - /// Caching type of Data Disk. - public Caching? Caching { get; } - /// The initial disk size in gigabytes. - public int? DiskSizeGB { get; } - /// The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. - public int? Lun { get; } - /// type of this storage account. - public StorageAccountType? StorageAccountType { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataMount.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataMount.Serialization.cs deleted file mode 100644 index c1bc4175f460..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataMount.Serialization.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceDataMount - { - internal static ComputeInstanceDataMount DeserializeComputeInstanceDataMount(JsonElement element) - { - Optional source = default; - Optional sourceType = default; - Optional mountName = default; - Optional mountAction = default; - Optional createdBy = default; - Optional mountPath = default; - Optional mountState = default; - Optional mountedOn = default; - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("source")) - { - source = property.Value.GetString(); - continue; - } - if (property.NameEquals("sourceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sourceType = new SourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("mountName")) - { - mountName = property.Value.GetString(); - continue; - } - if (property.NameEquals("mountAction")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mountAction = new MountAction(property.Value.GetString()); - continue; - } - if (property.NameEquals("createdBy")) - { - createdBy = property.Value.GetString(); - continue; - } - if (property.NameEquals("mountPath")) - { - mountPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("mountState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mountState = new MountState(property.Value.GetString()); - continue; - } - if (property.NameEquals("mountedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mountedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("error")) - { - error = property.Value.GetString(); - continue; - } - } - return new ComputeInstanceDataMount(source.Value, Optional.ToNullable(sourceType), mountName.Value, Optional.ToNullable(mountAction), createdBy.Value, mountPath.Value, Optional.ToNullable(mountState), Optional.ToNullable(mountedOn), error.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataMount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataMount.cs deleted file mode 100644 index 37a03c5877e2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceDataMount.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Defines an Aml Instance DataMount. - public partial class ComputeInstanceDataMount - { - /// Initializes a new instance of ComputeInstanceDataMount. - internal ComputeInstanceDataMount() - { - } - - /// Initializes a new instance of ComputeInstanceDataMount. - /// 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. - internal ComputeInstanceDataMount(string source, SourceType? sourceType, string mountName, MountAction? mountAction, string createdBy, string mountPath, MountState? mountState, DateTimeOffset? mountedOn, string error) - { - Source = source; - SourceType = sourceType; - MountName = mountName; - MountAction = mountAction; - CreatedBy = createdBy; - MountPath = mountPath; - MountState = mountState; - MountedOn = mountedOn; - Error = error; - } - - /// Source of the ComputeInstance data mount. - public string Source { get; } - /// Data source type. - public SourceType? SourceType { get; } - /// name of the ComputeInstance data mount. - public string MountName { get; } - /// Mount Action. - public MountAction? MountAction { get; } - /// who this data mount created by. - public string CreatedBy { get; } - /// Path of this data mount. - public string MountPath { get; } - /// Mount state. - public MountState? MountState { get; } - /// The time when the disk mounted. - public DateTimeOffset? MountedOn { get; } - /// Error of this data mount. - public string Error { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceEnvironmentInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceEnvironmentInfo.Serialization.cs deleted file mode 100644 index 5ebf03355e5b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceEnvironmentInfo.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceEnvironmentInfo - { - internal static ComputeInstanceEnvironmentInfo DeserializeComputeInstanceEnvironmentInfo(JsonElement element) - { - Optional name = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - } - return new ComputeInstanceEnvironmentInfo(name.Value, version.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceEnvironmentInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceEnvironmentInfo.cs deleted file mode 100644 index 179d57644c01..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceEnvironmentInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Environment information. - public partial class ComputeInstanceEnvironmentInfo - { - /// Initializes a new instance of ComputeInstanceEnvironmentInfo. - internal ComputeInstanceEnvironmentInfo() - { - } - - /// Initializes a new instance of ComputeInstanceEnvironmentInfo. - /// name of environment. - /// version of environment. - internal ComputeInstanceEnvironmentInfo(string name, string version) - { - Name = name; - Version = version; - } - - /// name of environment. - public string Name { get; } - /// version of environment. - public string Version { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs deleted file mode 100644 index 141dbcac7704..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceLastOperation.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceLastOperation - { - internal static ComputeInstanceLastOperation DeserializeComputeInstanceLastOperation(JsonElement element) - { - Optional operationName = default; - Optional operationTime = default; - Optional operationStatus = default; - Optional operationTrigger = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("operationName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - operationName = new OperationName(property.Value.GetString()); - continue; - } - if (property.NameEquals("operationTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - operationTime = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("operationStatus")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - operationStatus = new OperationStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("operationTrigger")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - operationTrigger = new OperationTrigger(property.Value.GetString()); - continue; - } - } - return new ComputeInstanceLastOperation(Optional.ToNullable(operationName), Optional.ToNullable(operationTime), Optional.ToNullable(operationStatus), Optional.ToNullable(operationTrigger)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceLastOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceLastOperation.cs deleted file mode 100644 index 03c8597882a4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceLastOperation.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The last operation on ComputeInstance. - public partial class ComputeInstanceLastOperation - { - /// Initializes a new instance of ComputeInstanceLastOperation. - internal ComputeInstanceLastOperation() - { - } - - /// Initializes a new instance of ComputeInstanceLastOperation. - /// Name of the last operation. - /// Time of the last operation. - /// Operation status. - /// Trigger of operation. - internal ComputeInstanceLastOperation(OperationName? operationName, DateTimeOffset? operationOn, OperationStatus? operationStatus, OperationTrigger? operationTrigger) - { - OperationName = operationName; - OperationOn = operationOn; - OperationStatus = operationStatus; - OperationTrigger = operationTrigger; - } - - /// Name of the last operation. - public OperationName? OperationName { get; } - /// Time of the last operation. - public DateTimeOffset? OperationOn { get; } - /// Operation status. - public OperationStatus? OperationStatus { get; } - /// Trigger of operation. - public OperationTrigger? OperationTrigger { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceProperties.Serialization.cs deleted file mode 100644 index 1ea436b35942..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceProperties.Serialization.cs +++ /dev/null @@ -1,334 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VmSize)) - { - writer.WritePropertyName("vmSize"); - writer.WriteStringValue(VmSize); - } - if (Optional.IsDefined(Subnet)) - { - if (Subnet != null) - { - writer.WritePropertyName("subnet"); - writer.WriteObjectValue(Subnet); - } - else - { - writer.WriteNull("subnet"); - } - } - if (Optional.IsDefined(ApplicationSharingPolicy)) - { - writer.WritePropertyName("applicationSharingPolicy"); - writer.WriteStringValue(ApplicationSharingPolicy.Value.ToString()); - } - if (Optional.IsDefined(SshSettings)) - { - if (SshSettings != null) - { - writer.WritePropertyName("sshSettings"); - writer.WriteObjectValue(SshSettings); - } - else - { - writer.WriteNull("sshSettings"); - } - } - if (Optional.IsDefined(ComputeInstanceAuthorizationType)) - { - if (ComputeInstanceAuthorizationType != null) - { - writer.WritePropertyName("computeInstanceAuthorizationType"); - writer.WriteStringValue(ComputeInstanceAuthorizationType.Value.ToString()); - } - else - { - writer.WriteNull("computeInstanceAuthorizationType"); - } - } - if (Optional.IsDefined(PersonalComputeInstanceSettings)) - { - if (PersonalComputeInstanceSettings != null) - { - writer.WritePropertyName("personalComputeInstanceSettings"); - writer.WriteObjectValue(PersonalComputeInstanceSettings); - } - else - { - writer.WriteNull("personalComputeInstanceSettings"); - } - } - if (Optional.IsDefined(SetupScriptsSettings)) - { - if (SetupScriptsSettings != null) - { - writer.WritePropertyName("setupScripts"); - writer.WriteObjectValue(SetupScriptsSettings); - } - else - { - writer.WriteNull("setupScripts"); - } - } - if (Optional.IsDefined(EnableNodePublicIP)) - { - writer.WritePropertyName("enableNodePublicIp"); - writer.WriteBooleanValue(EnableNodePublicIP.Value); - } - writer.WriteEndObject(); - } - - internal static ComputeInstanceProperties DeserializeComputeInstanceProperties(JsonElement element) - { - Optional vmSize = default; - Optional subnet = default; - Optional applicationSharingPolicy = default; - Optional sshSettings = default; - Optional connectivityEndpoints = default; - Optional> applications = default; - Optional createdBy = default; - Optional> errors = default; - Optional state = default; - Optional computeInstanceAuthorizationType = default; - Optional personalComputeInstanceSettings = default; - Optional setupScripts = default; - Optional lastOperation = default; - Optional schedules = default; - Optional enableNodePublicIP = default; - Optional> containers = default; - Optional> dataDisks = default; - Optional> dataMounts = default; - Optional versions = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vmSize")) - { - vmSize = property.Value.GetString(); - continue; - } - if (property.NameEquals("subnet")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - subnet = null; - continue; - } - subnet = ResourceId.DeserializeResourceId(property.Value); - continue; - } - if (property.NameEquals("applicationSharingPolicy")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - applicationSharingPolicy = new ApplicationSharingPolicy(property.Value.GetString()); - continue; - } - if (property.NameEquals("sshSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - sshSettings = null; - continue; - } - sshSettings = ComputeInstanceSshSettings.DeserializeComputeInstanceSshSettings(property.Value); - continue; - } - if (property.NameEquals("connectivityEndpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - connectivityEndpoints = ComputeInstanceConnectivityEndpoints.DeserializeComputeInstanceConnectivityEndpoints(property.Value); - continue; - } - if (property.NameEquals("applications")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ComputeInstanceApplication.DeserializeComputeInstanceApplication(item)); - } - applications = array; - continue; - } - if (property.NameEquals("createdBy")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdBy = ComputeInstanceCreatedBy.DeserializeComputeInstanceCreatedBy(property.Value); - continue; - } - if (property.NameEquals("errors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - errors = array; - continue; - } - if (property.NameEquals("state")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - state = new ComputeInstanceState(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeInstanceAuthorizationType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - computeInstanceAuthorizationType = null; - continue; - } - computeInstanceAuthorizationType = new ComputeInstanceAuthorizationType(property.Value.GetString()); - continue; - } - if (property.NameEquals("personalComputeInstanceSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - personalComputeInstanceSettings = null; - continue; - } - personalComputeInstanceSettings = PersonalComputeInstanceSettings.DeserializePersonalComputeInstanceSettings(property.Value); - continue; - } - if (property.NameEquals("setupScripts")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - setupScripts = null; - continue; - } - setupScripts = SetupScripts.DeserializeSetupScripts(property.Value); - continue; - } - if (property.NameEquals("lastOperation")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - lastOperation = null; - continue; - } - lastOperation = ComputeInstanceLastOperation.DeserializeComputeInstanceLastOperation(property.Value); - continue; - } - if (property.NameEquals("schedules")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - schedules = null; - continue; - } - schedules = ComputeSchedules.DeserializeComputeSchedules(property.Value); - continue; - } - if (property.NameEquals("enableNodePublicIp")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableNodePublicIP = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("containers")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - containers = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ComputeInstanceContainer.DeserializeComputeInstanceContainer(item)); - } - containers = array; - continue; - } - if (property.NameEquals("dataDisks")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - dataDisks = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ComputeInstanceDataDisk.DeserializeComputeInstanceDataDisk(item)); - } - dataDisks = array; - continue; - } - if (property.NameEquals("dataMounts")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - dataMounts = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ComputeInstanceDataMount.DeserializeComputeInstanceDataMount(item)); - } - dataMounts = array; - continue; - } - if (property.NameEquals("versions")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - versions = ComputeInstanceVersion.DeserializeComputeInstanceVersion(property.Value); - continue; - } - } - return new ComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), sshSettings.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, setupScripts.Value, lastOperation.Value, schedules.Value, Optional.ToNullable(enableNodePublicIP), Optional.ToList(containers), Optional.ToList(dataDisks), Optional.ToList(dataMounts), versions.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceProperties.cs deleted file mode 100644 index 46574fa43460..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceProperties.cs +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Compute Instance properties. - public partial class ComputeInstanceProperties - { - /// Initializes a new instance of ComputeInstanceProperties. - public ComputeInstanceProperties() - { - Applications = new ChangeTrackingList(); - Errors = new ChangeTrackingList(); - Containers = new ChangeTrackingList(); - DataDisks = new ChangeTrackingList(); - DataMounts = new ChangeTrackingList(); - } - - /// Initializes a new instance of ComputeInstanceProperties. - /// 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 policy and settings for SSH access. - /// Describes all connectivity endpoints available for this ComputeInstance. - /// Describes available applications and their endpoints on this ComputeInstance. - /// Describes information on user who created this ComputeInstance. - /// Collection of errors encountered on this ComputeInstance. - /// The current state of this ComputeInstance. - /// The Compute Instance Authorization type. Available values are personal (default). - /// 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. - /// 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. - internal ComputeInstanceProperties(string vmSize, ResourceId subnet, ApplicationSharingPolicy? applicationSharingPolicy, ComputeInstanceSshSettings sshSettings, ComputeInstanceConnectivityEndpoints connectivityEndpoints, IReadOnlyList applications, ComputeInstanceCreatedBy createdBy, IReadOnlyList errors, ComputeInstanceState? state, ComputeInstanceAuthorizationType? computeInstanceAuthorizationType, PersonalComputeInstanceSettings personalComputeInstanceSettings, SetupScripts setupScriptsSettings, ComputeInstanceLastOperation lastOperation, ComputeSchedules schedules, bool? enableNodePublicIP, IReadOnlyList containers, IReadOnlyList dataDisks, IReadOnlyList dataMounts, ComputeInstanceVersion versions) - { - VmSize = vmSize; - Subnet = subnet; - ApplicationSharingPolicy = applicationSharingPolicy; - SshSettings = sshSettings; - ConnectivityEndpoints = connectivityEndpoints; - Applications = applications; - CreatedBy = createdBy; - Errors = errors; - State = state; - ComputeInstanceAuthorizationType = computeInstanceAuthorizationType; - PersonalComputeInstanceSettings = personalComputeInstanceSettings; - SetupScriptsSettings = setupScriptsSettings; - LastOperation = lastOperation; - Schedules = schedules; - EnableNodePublicIP = enableNodePublicIP; - Containers = containers; - DataDisks = dataDisks; - DataMounts = dataMounts; - Versions = versions; - } - - /// Virtual Machine Size. - public string VmSize { get; set; } - /// Virtual network subnet resource ID the compute nodes belong to. - internal ResourceId Subnet { get; set; } - /// The ID of the resource. - public string SubnetId - { - get => Subnet is null ? default : Subnet.Id; - set => Subnet = new ResourceId(value); - } - - /// 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 ApplicationSharingPolicy? ApplicationSharingPolicy { get; set; } - /// Specifies policy and settings for SSH access. - public ComputeInstanceSshSettings SshSettings { get; set; } - /// Describes all connectivity endpoints available for this ComputeInstance. - public ComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get; } - /// Describes available applications and their endpoints on this ComputeInstance. - public IReadOnlyList Applications { get; } - /// Describes information on user who created this ComputeInstance. - public ComputeInstanceCreatedBy CreatedBy { get; } - /// Collection of errors encountered on this ComputeInstance. - public IReadOnlyList Errors { get; } - /// The current state of this ComputeInstance. - public ComputeInstanceState? State { get; } - /// The Compute Instance Authorization type. Available values are personal (default). - public ComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get; set; } - /// Settings for a personal compute instance. - internal PersonalComputeInstanceSettings PersonalComputeInstanceSettings { get; set; } - /// A user explicitly assigned to a personal compute instance. - public AssignedUser PersonalComputeInstanceAssignedUser - { - get => PersonalComputeInstanceSettings is null ? default : PersonalComputeInstanceSettings.AssignedUser; - set - { - if (PersonalComputeInstanceSettings is null) - PersonalComputeInstanceSettings = new PersonalComputeInstanceSettings(); - PersonalComputeInstanceSettings.AssignedUser = value; - } - } - - /// Details of customized scripts to execute for setting up the cluster. - internal SetupScripts SetupScriptsSettings { get; set; } - /// Customized setup scripts. - public ScriptsToExecute Scripts - { - get => SetupScriptsSettings is null ? default : SetupScriptsSettings.Scripts; - set - { - if (SetupScriptsSettings is null) - SetupScriptsSettings = new SetupScripts(); - SetupScriptsSettings.Scripts = value; - } - } - - /// The last operation on ComputeInstance. - public ComputeInstanceLastOperation LastOperation { get; } - /// The list of schedules to be applied on the computes. - internal ComputeSchedules Schedules { get; } - /// The list of compute start stop schedules to be applied. - public IReadOnlyList SchedulesComputeStartStop - { - get => Schedules?.ComputeStartStop; - } - - /// 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. - public IReadOnlyList Containers { get; } - /// Describes informations of dataDisks on this ComputeInstance. - public IReadOnlyList DataDisks { get; } - /// Describes informations of dataMounts on this ComputeInstance. - public IReadOnlyList DataMounts { get; } - /// ComputeInstance version. - internal ComputeInstanceVersion Versions { get; } - /// Runtime of compute instance. - public string VersionsRuntime - { - get => Versions?.Runtime; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs deleted file mode 100644 index 191c428df843..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceSshSettings.Serialization.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeInstanceSshSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SshPublicAccess)) - { - writer.WritePropertyName("sshPublicAccess"); - writer.WriteStringValue(SshPublicAccess.Value.ToString()); - } - if (Optional.IsDefined(AdminPublicKey)) - { - writer.WritePropertyName("adminPublicKey"); - writer.WriteStringValue(AdminPublicKey); - } - writer.WriteEndObject(); - } - - internal static ComputeInstanceSshSettings DeserializeComputeInstanceSshSettings(JsonElement element) - { - Optional sshPublicAccess = default; - Optional adminUserName = default; - Optional sshPort = default; - Optional adminPublicKey = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sshPublicAccess")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sshPublicAccess = new SshPublicAccess(property.Value.GetString()); - continue; - } - if (property.NameEquals("adminUserName")) - { - adminUserName = property.Value.GetString(); - continue; - } - if (property.NameEquals("sshPort")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sshPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("adminPublicKey")) - { - adminPublicKey = property.Value.GetString(); - continue; - } - } - return new ComputeInstanceSshSettings(Optional.ToNullable(sshPublicAccess), adminUserName.Value, Optional.ToNullable(sshPort), adminPublicKey.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceSshSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceSshSettings.cs deleted file mode 100644 index 53b5f1f897d9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceSshSettings.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Specifies policy and settings for SSH access. - public partial class ComputeInstanceSshSettings - { - /// Initializes a new instance of ComputeInstanceSshSettings. - public ComputeInstanceSshSettings() - { - } - - /// Initializes a new instance of ComputeInstanceSshSettings. - /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. - /// Describes the admin user name. - /// Describes the port for connecting through SSH. - /// Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. - internal ComputeInstanceSshSettings(SshPublicAccess? sshPublicAccess, string adminUserName, int? sshPort, string adminPublicKey) - { - SshPublicAccess = sshPublicAccess; - AdminUserName = adminUserName; - SshPort = sshPort; - AdminPublicKey = adminPublicKey; - } - - /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. - public SshPublicAccess? SshPublicAccess { get; set; } - /// Describes the admin user name. - public string AdminUserName { get; } - /// Describes the port for connecting through SSH. - public int? SshPort { get; } - /// Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. - public string AdminPublicKey { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceState.cs deleted file mode 100644 index 10473e0a4663..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceState.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Current state of an ComputeInstance. - public readonly partial struct ComputeInstanceState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ComputeInstanceState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatingValue = "Creating"; - private const string CreateFailedValue = "CreateFailed"; - private const string DeletingValue = "Deleting"; - private const string RunningValue = "Running"; - private const string RestartingValue = "Restarting"; - private const string JobRunningValue = "JobRunning"; - private const string SettingUpValue = "SettingUp"; - private const string SetupFailedValue = "SetupFailed"; - private const string StartingValue = "Starting"; - private const string StoppedValue = "Stopped"; - private const string StoppingValue = "Stopping"; - private const string UserSettingUpValue = "UserSettingUp"; - private const string UserSetupFailedValue = "UserSetupFailed"; - private const string UnknownValue = "Unknown"; - private const string UnusableValue = "Unusable"; - - /// Creating. - public static ComputeInstanceState Creating { get; } = new ComputeInstanceState(CreatingValue); - /// CreateFailed. - public static ComputeInstanceState CreateFailed { get; } = new ComputeInstanceState(CreateFailedValue); - /// Deleting. - public static ComputeInstanceState Deleting { get; } = new ComputeInstanceState(DeletingValue); - /// Running. - public static ComputeInstanceState Running { get; } = new ComputeInstanceState(RunningValue); - /// Restarting. - public static ComputeInstanceState Restarting { get; } = new ComputeInstanceState(RestartingValue); - /// JobRunning. - public static ComputeInstanceState JobRunning { get; } = new ComputeInstanceState(JobRunningValue); - /// SettingUp. - public static ComputeInstanceState SettingUp { get; } = new ComputeInstanceState(SettingUpValue); - /// SetupFailed. - public static ComputeInstanceState SetupFailed { get; } = new ComputeInstanceState(SetupFailedValue); - /// Starting. - public static ComputeInstanceState Starting { get; } = new ComputeInstanceState(StartingValue); - /// Stopped. - public static ComputeInstanceState Stopped { get; } = new ComputeInstanceState(StoppedValue); - /// Stopping. - public static ComputeInstanceState Stopping { get; } = new ComputeInstanceState(StoppingValue); - /// UserSettingUp. - public static ComputeInstanceState UserSettingUp { get; } = new ComputeInstanceState(UserSettingUpValue); - /// UserSetupFailed. - public static ComputeInstanceState UserSetupFailed { get; } = new ComputeInstanceState(UserSetupFailedValue); - /// Unknown. - public static ComputeInstanceState Unknown { get; } = new ComputeInstanceState(UnknownValue); - /// Unusable. - public static ComputeInstanceState Unusable { get; } = new ComputeInstanceState(UnusableValue); - /// Determines if two values are the same. - public static bool operator ==(ComputeInstanceState left, ComputeInstanceState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ComputeInstanceState left, ComputeInstanceState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ComputeInstanceState(string value) => new ComputeInstanceState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ComputeInstanceState other && Equals(other); - /// - public bool Equals(ComputeInstanceState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceVersion.cs index ce0e52e3f42c..9ed6c5fc1890 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceVersion.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeInstanceVersion.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Version of computeInstance. + /// + /// Version of computeInstance. + /// Serialized Name: ComputeInstanceVersion + /// internal partial class ComputeInstanceVersion { /// Initializes a new instance of ComputeInstanceVersion. @@ -16,13 +19,19 @@ internal ComputeInstanceVersion() } /// Initializes a new instance of ComputeInstanceVersion. - /// Runtime of compute instance. + /// + /// Runtime of compute instance. + /// Serialized Name: ComputeInstanceVersion.runtime + /// internal ComputeInstanceVersion(string runtime) { Runtime = runtime; } - /// Runtime of compute instance. + /// + /// Runtime of compute instance. + /// Serialized Name: ComputeInstanceVersion.runtime + /// public string Runtime { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputePowerAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputePowerAction.cs deleted file mode 100644 index a348f1039b57..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputePowerAction.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 compute power action. - public readonly partial struct ComputePowerAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ComputePowerAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StartValue = "Start"; - private const string StopValue = "Stop"; - - /// Start. - public static ComputePowerAction Start { get; } = new ComputePowerAction(StartValue); - /// Stop. - public static ComputePowerAction Stop { get; } = new ComputePowerAction(StopValue); - /// Determines if two values are the same. - public static bool operator ==(ComputePowerAction left, ComputePowerAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ComputePowerAction left, ComputePowerAction right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ComputePowerAction(string value) => new ComputePowerAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ComputePowerAction other && Equals(other); - /// - public bool Equals(ComputePowerAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs index bb65f7dc7e80..6db53d982375 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.Serialization.cs @@ -15,7 +15,7 @@ internal partial class ComputeSchedules { internal static ComputeSchedules DeserializeComputeSchedules(JsonElement element) { - Optional> computeStartStop = default; + Optional> computeStartStop = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("computeStartStop")) @@ -25,10 +25,10 @@ internal static ComputeSchedules DeserializeComputeSchedules(JsonElement element property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ComputeStartStopSchedule.DeserializeComputeStartStopSchedule(item)); + array.Add(MachineLearningComputeStartStopSchedule.DeserializeMachineLearningComputeStartStopSchedule(item)); } computeStartStop = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs index 4753a18cc963..a6e6723fca50 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSchedules.cs @@ -10,23 +10,32 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The list of schedules to be applied on the computes. + /// + /// The list of schedules to be applied on the computes + /// Serialized Name: ComputeSchedules + /// internal partial class ComputeSchedules { /// Initializes a new instance of ComputeSchedules. internal ComputeSchedules() { - ComputeStartStop = new ChangeTrackingList(); + ComputeStartStop = new ChangeTrackingList(); } /// Initializes a new instance of ComputeSchedules. - /// The list of compute start stop schedules to be applied. - internal ComputeSchedules(IReadOnlyList computeStartStop) + /// + /// The list of compute start stop schedules to be applied. + /// Serialized Name: ComputeSchedules.computeStartStop + /// + internal ComputeSchedules(IReadOnlyList computeStartStop) { ComputeStartStop = computeStartStop; } - /// The list of compute start stop schedules to be applied. - public IReadOnlyList ComputeStartStop { get; } + /// + /// The list of compute start stop schedules to be applied. + /// Serialized Name: ComputeSchedules.computeStartStop + /// + public IReadOnlyList ComputeStartStop { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSecrets.Serialization.cs deleted file mode 100644 index 616769b6dc5e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSecrets.Serialization.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeSecrets - { - internal static ComputeSecrets DeserializeComputeSecrets(JsonElement element) - { - if (element.TryGetProperty("computeType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AKS": return AksComputeSecrets.DeserializeAksComputeSecrets(element); - case "Databricks": return DatabricksComputeSecrets.DeserializeDatabricksComputeSecrets(element); - case "VirtualMachine": return VirtualMachineSecrets.DeserializeVirtualMachineSecrets(element); - } - } - return UnknownComputeSecrets.DeserializeUnknownComputeSecrets(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSecrets.cs deleted file mode 100644 index ca0c6ec12768..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeSecrets.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Secrets related to a Machine Learning compute. Might differ for every type of compute. - /// Please note is the base class. According to the scenario, a derived class 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 ComputeSecrets - { - /// Initializes a new instance of ComputeSecrets. - protected ComputeSecrets() - { - } - - /// Initializes a new instance of ComputeSecrets. - /// The type of compute. - internal ComputeSecrets(ComputeType computeType) - { - ComputeType = computeType; - } - - /// The type of compute. - internal ComputeType ComputeType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopSchedule.Serialization.cs deleted file mode 100644 index 5d7580292610..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopSchedule.Serialization.cs +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ComputeStartStopSchedule - { - internal static ComputeStartStopSchedule DeserializeComputeStartStopSchedule(JsonElement element) - { - Optional id = default; - Optional provisioningStatus = default; - Optional status = default; - Optional action = default; - Optional triggerType = default; - Optional recurrence = default; - Optional cron = default; - Optional schedule = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningStatus")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningStatus = new ProvisioningStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new ScheduleStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("action")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - action = new ComputePowerAction(property.Value.GetString()); - continue; - } - if (property.NameEquals("triggerType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - triggerType = new TriggerType(property.Value.GetString()); - continue; - } - if (property.NameEquals("recurrence")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - recurrence = RecurrenceTrigger.DeserializeRecurrenceTrigger(property.Value); - continue; - } - if (property.NameEquals("cron")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - cron = CronTrigger.DeserializeCronTrigger(property.Value); - continue; - } - if (property.NameEquals("schedule")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - schedule = ScheduleBase.DeserializeScheduleBase(property.Value); - continue; - } - } - return new ComputeStartStopSchedule(id.Value, Optional.ToNullable(provisioningStatus), Optional.ToNullable(status), Optional.ToNullable(action), Optional.ToNullable(triggerType), recurrence.Value, cron.Value, schedule.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopSchedule.cs deleted file mode 100644 index e2688ab380bc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeStartStopSchedule.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Compute start stop schedule properties. - public partial class ComputeStartStopSchedule - { - /// Initializes a new instance of ComputeStartStopSchedule. - internal ComputeStartStopSchedule() - { - } - - /// Initializes a new instance of ComputeStartStopSchedule. - /// A system assigned id for the schedule. - /// The current deployment state of schedule. - /// Is the schedule enabled or disabled?. - /// [Required] The compute power action. - /// [Required] The schedule trigger type. - /// Required if triggerType is Recurrence. - /// Required if triggerType is Cron. - /// [Deprecated] Not used any more. - internal ComputeStartStopSchedule(string id, ProvisioningStatus? provisioningStatus, ScheduleStatus? status, ComputePowerAction? action, TriggerType? triggerType, RecurrenceTrigger recurrence, CronTrigger cron, ScheduleBase schedule) - { - Id = id; - ProvisioningStatus = provisioningStatus; - Status = status; - Action = action; - TriggerType = triggerType; - Recurrence = recurrence; - Cron = cron; - Schedule = schedule; - } - - /// A system assigned id for the schedule. - public string Id { get; } - /// The current deployment state of schedule. - public ProvisioningStatus? ProvisioningStatus { get; } - /// Is the schedule enabled or disabled?. - public ScheduleStatus? Status { get; } - /// [Required] The compute power action. - public ComputePowerAction? Action { get; } - /// [Required] The schedule trigger type. - public TriggerType? TriggerType { get; } - /// Required if triggerType is Recurrence. - public RecurrenceTrigger Recurrence { get; } - /// Required if triggerType is Cron. - public CronTrigger Cron { get; } - /// [Deprecated] Not used any more. - public ScheduleBase Schedule { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeType.cs index 8fbf23324d93..12ce67bc232a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ComputeType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The type of compute. + /// + /// The type of compute + /// Serialized Name: ComputeType + /// internal readonly partial struct ComputeType : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public ComputeType(string value) private const string DataLakeAnalyticsValue = "DataLakeAnalytics"; private const string SynapseSparkValue = "SynapseSpark"; - /// AKS. + /// + /// AKS + /// Serialized Name: ComputeType.AKS + /// public static ComputeType Aks { get; } = new ComputeType(AksValue); - /// Kubernetes. + /// + /// Kubernetes + /// Serialized Name: ComputeType.Kubernetes + /// public static ComputeType Kubernetes { get; } = new ComputeType(KubernetesValue); - /// AmlCompute. + /// + /// AmlCompute + /// Serialized Name: ComputeType.AmlCompute + /// public static ComputeType AmlCompute { get; } = new ComputeType(AmlComputeValue); - /// ComputeInstance. + /// + /// ComputeInstance + /// Serialized Name: ComputeType.ComputeInstance + /// public static ComputeType ComputeInstance { get; } = new ComputeType(ComputeInstanceValue); - /// DataFactory. + /// + /// DataFactory + /// Serialized Name: ComputeType.DataFactory + /// public static ComputeType DataFactory { get; } = new ComputeType(DataFactoryValue); - /// VirtualMachine. + /// + /// VirtualMachine + /// Serialized Name: ComputeType.VirtualMachine + /// public static ComputeType VirtualMachine { get; } = new ComputeType(VirtualMachineValue); - /// HDInsight. + /// + /// HDInsight + /// Serialized Name: ComputeType.HDInsight + /// public static ComputeType HDInsight { get; } = new ComputeType(HDInsightValue); - /// Databricks. + /// + /// Databricks + /// Serialized Name: ComputeType.Databricks + /// public static ComputeType Databricks { get; } = new ComputeType(DatabricksValue); - /// DataLakeAnalytics. + /// + /// DataLakeAnalytics + /// Serialized Name: ComputeType.DataLakeAnalytics + /// public static ComputeType DataLakeAnalytics { get; } = new ComputeType(DataLakeAnalyticsValue); - /// SynapseSpark. + /// + /// SynapseSpark + /// Serialized Name: ComputeType.SynapseSpark + /// public static ComputeType SynapseSpark { get; } = new ComputeType(SynapseSparkValue); /// Determines if two values are the same. public static bool operator ==(ComputeType left, ComputeType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ConnectionAuthType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ConnectionAuthType.cs deleted file mode 100644 index db7e9bcd9d90..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ConnectionAuthType.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 -{ - /// Authentication type of the connection target. - internal readonly partial struct ConnectionAuthType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ConnectionAuthType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PATValue = "PAT"; - private const string ManagedIdentityValue = "ManagedIdentity"; - private const string UsernamePasswordValue = "UsernamePassword"; - private const string NoneValue = "None"; - private const string SASValue = "SAS"; - - /// PAT. - public static ConnectionAuthType PAT { get; } = new ConnectionAuthType(PATValue); - /// ManagedIdentity. - public static ConnectionAuthType ManagedIdentity { get; } = new ConnectionAuthType(ManagedIdentityValue); - /// UsernamePassword. - public static ConnectionAuthType UsernamePassword { get; } = new ConnectionAuthType(UsernamePasswordValue); - /// None. - public static ConnectionAuthType None { get; } = new ConnectionAuthType(NoneValue); - /// SAS. - public static ConnectionAuthType SAS { get; } = new ConnectionAuthType(SASValue); - /// Determines if two values are the same. - public static bool operator ==(ConnectionAuthType left, ConnectionAuthType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ConnectionAuthType left, ConnectionAuthType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ConnectionAuthType(string value) => new ConnectionAuthType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConnectionAuthType other && Equals(other); - /// - public bool Equals(ConnectionAuthType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ConnectionCategory.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ConnectionCategory.cs deleted file mode 100644 index 4879f993eb2d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ConnectionCategory.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 -{ - /// Category of the connection. - public readonly partial struct ConnectionCategory : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ConnectionCategory(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PythonFeedValue = "PythonFeed"; - private const string ContainerRegistryValue = "ContainerRegistry"; - private const string GitValue = "Git"; - - /// PythonFeed. - public static ConnectionCategory PythonFeed { get; } = new ConnectionCategory(PythonFeedValue); - /// ContainerRegistry. - public static ConnectionCategory ContainerRegistry { get; } = new ConnectionCategory(ContainerRegistryValue); - /// Git. - public static ConnectionCategory Git { get; } = new ConnectionCategory(GitValue); - /// Determines if two values are the same. - public static bool operator ==(ConnectionCategory left, ConnectionCategory right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ConnectionCategory left, ConnectionCategory right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ConnectionCategory(string value) => new ConnectionCategory(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ConnectionCategory other && Equals(other); - /// - public bool Equals(ConnectionCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceRequirements.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceRequirements.Serialization.cs deleted file mode 100644 index 3b6b7df887f6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceRequirements.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ContainerResourceRequirements : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContainerResourceLimits)) - { - if (ContainerResourceLimits != null) - { - writer.WritePropertyName("containerResourceLimits"); - writer.WriteObjectValue(ContainerResourceLimits); - } - else - { - writer.WriteNull("containerResourceLimits"); - } - } - if (Optional.IsDefined(ContainerResourceRequests)) - { - if (ContainerResourceRequests != null) - { - writer.WritePropertyName("containerResourceRequests"); - writer.WriteObjectValue(ContainerResourceRequests); - } - else - { - writer.WriteNull("containerResourceRequests"); - } - } - writer.WriteEndObject(); - } - - internal static ContainerResourceRequirements DeserializeContainerResourceRequirements(JsonElement element) - { - Optional containerResourceLimits = default; - Optional containerResourceRequests = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("containerResourceLimits")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - containerResourceLimits = null; - continue; - } - containerResourceLimits = ContainerResourceSettings.DeserializeContainerResourceSettings(property.Value); - continue; - } - if (property.NameEquals("containerResourceRequests")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - containerResourceRequests = null; - continue; - } - containerResourceRequests = ContainerResourceSettings.DeserializeContainerResourceSettings(property.Value); - continue; - } - } - return new ContainerResourceRequirements(containerResourceLimits.Value, containerResourceRequests.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceRequirements.cs deleted file mode 100644 index aec3c6a0cd32..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceRequirements.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Resource requirements for each container instance within an online deployment. - public partial class ContainerResourceRequirements - { - /// Initializes a new instance of ContainerResourceRequirements. - public ContainerResourceRequirements() - { - } - - /// Initializes a new instance of ContainerResourceRequirements. - /// Container resource limit info:. - /// Container resource request info:. - internal ContainerResourceRequirements(ContainerResourceSettings containerResourceLimits, ContainerResourceSettings containerResourceRequests) - { - ContainerResourceLimits = containerResourceLimits; - ContainerResourceRequests = containerResourceRequests; - } - - /// Container resource limit info:. - public ContainerResourceSettings ContainerResourceLimits { get; set; } - /// Container resource request info:. - public ContainerResourceSettings ContainerResourceRequests { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceSettings.Serialization.cs deleted file mode 100644 index 7e7bd6aebaba..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceSettings.Serialization.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ContainerResourceSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Cpu)) - { - if (Cpu != null) - { - writer.WritePropertyName("cpu"); - writer.WriteStringValue(Cpu); - } - else - { - writer.WriteNull("cpu"); - } - } - if (Optional.IsDefined(Gpu)) - { - if (Gpu != null) - { - writer.WritePropertyName("gpu"); - writer.WriteStringValue(Gpu); - } - else - { - writer.WriteNull("gpu"); - } - } - if (Optional.IsDefined(Memory)) - { - if (Memory != null) - { - writer.WritePropertyName("memory"); - writer.WriteStringValue(Memory); - } - else - { - writer.WriteNull("memory"); - } - } - writer.WriteEndObject(); - } - - internal static ContainerResourceSettings DeserializeContainerResourceSettings(JsonElement element) - { - Optional cpu = default; - Optional gpu = default; - Optional memory = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("cpu")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - cpu = null; - continue; - } - cpu = property.Value.GetString(); - continue; - } - if (property.NameEquals("gpu")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - gpu = null; - continue; - } - gpu = property.Value.GetString(); - continue; - } - if (property.NameEquals("memory")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - memory = null; - continue; - } - memory = property.Value.GetString(); - continue; - } - } - return new ContainerResourceSettings(cpu.Value, gpu.Value, memory.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceSettings.cs deleted file mode 100644 index 77e41fc44bf9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerResourceSettings.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ContainerResourceSettings. - public partial class ContainerResourceSettings - { - /// Initializes a new instance of ContainerResourceSettings. - public ContainerResourceSettings() - { - } - - /// Initializes a new instance of ContainerResourceSettings. - /// - /// 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/ - /// - internal ContainerResourceSettings(string cpu, string gpu, string memory) - { - Cpu = cpu; - Gpu = gpu; - Memory = memory; - } - - /// - /// Number of vCPUs request/limit for container. More info: - /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - /// - public string Cpu { get; set; } - /// - /// Number of Nvidia GPU cards request/limit for container. More info: - /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - /// - public string Gpu { get; set; } - /// - /// Memory size request/limit for container. More info: - /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - /// - public string Memory { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerType.cs deleted file mode 100644 index ab47ea65a89d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ContainerType.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 ContainerType. - public readonly partial struct ContainerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StorageInitializerValue = "StorageInitializer"; - private const string InferenceServerValue = "InferenceServer"; - - /// StorageInitializer. - public static ContainerType StorageInitializer { get; } = new ContainerType(StorageInitializerValue); - /// InferenceServer. - public static ContainerType InferenceServer { get; } = new ContainerType(InferenceServerValue); - /// Determines if two values are the same. - public static bool operator ==(ContainerType left, ContainerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerType left, ContainerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ContainerType(string value) => new ContainerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerType other && Equals(other); - /// - public bool Equals(ContainerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} 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 df1c551b9cf2..a75897c9df26 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CosmosDbSettings.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The CosmosDbSettings. + /// + /// The CosmosDbSettings. + /// Serialized Name: CosmosDbSettings + /// internal partial class CosmosDbSettings { /// Initializes a new instance of CosmosDbSettings. @@ -16,13 +19,19 @@ public CosmosDbSettings() } /// Initializes a new instance of CosmosDbSettings. - /// The throughput of the collections in cosmosdb database. + /// + /// The throughput of the collections in cosmosdb database + /// Serialized Name: CosmosDbSettings.collectionsThroughput + /// internal CosmosDbSettings(int? collectionsThroughput) { CollectionsThroughput = collectionsThroughput; } - /// The throughput of the collections in cosmosdb database. + /// + /// The throughput of the collections in cosmosdb database + /// Serialized Name: CosmosDbSettings.collectionsThroughput + /// public int? CollectionsThroughput { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs index d5aab2ec1aa4..d3d7e49b66b7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CredentialsType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the datastore credentials type. + /// + /// Enum to determine the datastore credentials type. + /// Serialized Name: CredentialsType + /// internal readonly partial struct CredentialsType : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public CredentialsType(string value) private const string SasValue = "Sas"; private const string ServicePrincipalValue = "ServicePrincipal"; - /// AccountKey. + /// + /// AccountKey + /// Serialized Name: CredentialsType.AccountKey + /// public static CredentialsType AccountKey { get; } = new CredentialsType(AccountKeyValue); - /// Certificate. + /// + /// Certificate + /// Serialized Name: CredentialsType.Certificate + /// public static CredentialsType Certificate { get; } = new CredentialsType(CertificateValue); - /// None. + /// + /// None + /// Serialized Name: CredentialsType.None + /// public static CredentialsType None { get; } = new CredentialsType(NoneValue); - /// Sas. + /// + /// Sas + /// Serialized Name: CredentialsType.Sas + /// public static CredentialsType Sas { get; } = new CredentialsType(SasValue); - /// ServicePrincipal. + /// + /// ServicePrincipal + /// Serialized Name: CredentialsType.ServicePrincipal + /// public static CredentialsType ServicePrincipal { get; } = new CredentialsType(ServicePrincipalValue); /// Determines if two values are the same. public static bool operator ==(CredentialsType left, CredentialsType right) => left.Equals(right); 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 3c7d1c936c30..4a547640a60e 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 @@ -57,7 +57,7 @@ internal static CronTrigger DeserializeCronTrigger(JsonElement element) Optional endTime = default; Optional startTime = default; Optional timeZone = default; - TriggerType triggerType = default; + MachineLearningTriggerType triggerType = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("expression")) @@ -92,7 +92,7 @@ internal static CronTrigger DeserializeCronTrigger(JsonElement element) } if (property.NameEquals("triggerType")) { - triggerType = new TriggerType(property.Value.GetString()); + triggerType = new MachineLearningTriggerType(property.Value.GetString()); continue; } } 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 49e9755abdb4..ae6704399839 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CronTrigger.cs @@ -10,13 +10,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The CronTrigger. - public partial class CronTrigger : TriggerBase + /// + /// The CronTrigger. + /// Serialized Name: CronTrigger + /// + public partial class CronTrigger : MachineLearningTriggerBase { /// Initializes a new instance of CronTrigger. /// /// [Required] Specifies cron expression of schedule. /// The expression should follow NCronTab format. + /// Serialized Name: CronTrigger.expression /// /// is null. public CronTrigger(string expression) @@ -24,7 +28,7 @@ public CronTrigger(string expression) Argument.AssertNotNull(expression, nameof(expression)); Expression = expression; - TriggerType = TriggerType.Cron; + TriggerType = MachineLearningTriggerType.Cron; } /// Initializes a new instance of CronTrigger. @@ -32,18 +36,27 @@ public CronTrigger(string expression) /// 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" /// If not present, the schedule will run indefinitely + /// Serialized Name: TriggerBase.endTime + /// + /// + /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + /// Serialized Name: TriggerBase.startTime /// - /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. /// /// 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 + /// Serialized Name: TriggerBase.timeZone + /// + /// + /// [Required] + /// Serialized Name: TriggerBase.triggerType /// - /// [Required]. /// /// [Required] Specifies cron expression of schedule. /// The expression should follow NCronTab format. + /// Serialized Name: CronTrigger.expression /// - internal CronTrigger(string endTime, string startTime, string timeZone, TriggerType triggerType, string expression) : base(endTime, startTime, timeZone, triggerType) + internal CronTrigger(string endTime, string startTime, string timeZone, MachineLearningTriggerType triggerType, string expression) : base(endTime, startTime, timeZone, triggerType) { Expression = expression; TriggerType = triggerType; @@ -52,6 +65,7 @@ internal CronTrigger(string endTime, string startTime, string timeZone, TriggerT /// /// [Required] Specifies cron expression of schedule. /// The expression should follow NCronTab format. + /// Serialized Name: CronTrigger.expression /// public string Expression { get; set; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomForecastHorizon.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomForecastHorizon.cs index f7eaef7c4c08..2675757b5b98 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomForecastHorizon.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomForecastHorizon.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The desired maximum forecast horizon in units of time-series frequency. + /// + /// The desired maximum forecast horizon in units of time-series frequency. + /// Serialized Name: CustomForecastHorizon + /// public partial class CustomForecastHorizon : ForecastHorizon { /// Initializes a new instance of CustomForecastHorizon. - /// [Required] Forecast horizon value. + /// + /// [Required] Forecast horizon value. + /// Serialized Name: CustomForecastHorizon.value + /// public CustomForecastHorizon(int value) { Value = value; @@ -19,15 +25,24 @@ public CustomForecastHorizon(int value) } /// Initializes a new instance of CustomForecastHorizon. - /// [Required] Set forecast horizon value selection mode. - /// [Required] Forecast horizon value. + /// + /// [Required] Set forecast horizon value selection mode. + /// Serialized Name: ForecastHorizon.mode + /// + /// + /// [Required] Forecast horizon value. + /// Serialized Name: CustomForecastHorizon.value + /// internal CustomForecastHorizon(ForecastHorizonMode mode, int value) : base(mode) { Value = value; Mode = mode; } - /// [Required] Forecast horizon value. + /// + /// [Required] Forecast horizon value. + /// Serialized Name: CustomForecastHorizon.value + /// public int Value { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobInput.Serialization.cs deleted file mode 100644 index 8e53c826155b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobInput.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CustomModelJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static CustomModelJobInput DeserializeCustomModelJobInput(JsonElement element) - { - Optional mode = default; - Uri uri = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new InputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new CustomModelJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobInput.cs deleted file mode 100644 index ef2e22f4b243..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The CustomModelJobInput. - public partial class CustomModelJobInput : JobInput - { - /// Initializes a new instance of CustomModelJobInput. - /// [Required] Input Asset URI. - /// is null. - public CustomModelJobInput(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - JobInputType = JobInputType.CustomModel; - } - - /// Initializes a new instance of CustomModelJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// Input Asset Delivery Mode. - /// [Required] Input Asset URI. - internal CustomModelJobInput(string description, JobInputType jobInputType, InputDeliveryMode? mode, Uri uri) : base(description, jobInputType) - { - Mode = mode; - Uri = uri; - JobInputType = jobInputType; - } - - /// Input Asset Delivery Mode. - public InputDeliveryMode? Mode { get; set; } - /// [Required] Input Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobOutput.Serialization.cs deleted file mode 100644 index 4dcb81681461..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobOutput.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class CustomModelJobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - if (Uri != null) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static CustomModelJobOutput DeserializeCustomModelJobOutput(JsonElement element) - { - Optional mode = default; - Optional uri = default; - Optional description = default; - JobOutputType jobOutputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new OutputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobOutputType")) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } - } - return new CustomModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobOutput.cs deleted file mode 100644 index c96567c37abf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomModelJobOutput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The CustomModelJobOutput. - public partial class CustomModelJobOutput : JobOutput - { - /// Initializes a new instance of CustomModelJobOutput. - public CustomModelJobOutput() - { - JobOutputType = JobOutputType.CustomModel; - } - - /// Initializes a new instance of CustomModelJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - /// Output Asset Delivery Mode. - /// Output Asset URI. - internal CustomModelJobOutput(string description, JobOutputType jobOutputType, OutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) - { - Mode = mode; - Uri = uri; - JobOutputType = jobOutputType; - } - - /// Output Asset Delivery Mode. - public OutputDeliveryMode? Mode { get; set; } - /// Output Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomNCrossValidations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomNCrossValidations.cs index a7d951bb347e..f16954a3c954 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomNCrossValidations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomNCrossValidations.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// N-Cross validations are specified by user. + /// + /// N-Cross validations are specified by user. + /// Serialized Name: CustomNCrossValidations + /// public partial class CustomNCrossValidations : NCrossValidations { /// Initializes a new instance of CustomNCrossValidations. - /// [Required] N-Cross validations value. + /// + /// [Required] N-Cross validations value. + /// Serialized Name: CustomNCrossValidations.value + /// public CustomNCrossValidations(int value) { Value = value; @@ -19,15 +25,24 @@ public CustomNCrossValidations(int value) } /// Initializes a new instance of CustomNCrossValidations. - /// [Required] Mode for determining N-Cross validations. - /// [Required] N-Cross validations value. + /// + /// [Required] Mode for determining N-Cross validations. + /// Serialized Name: NCrossValidations.mode + /// + /// + /// [Required] N-Cross validations value. + /// Serialized Name: CustomNCrossValidations.value + /// internal CustomNCrossValidations(NCrossValidationsMode mode, int value) : base(mode) { Value = value; Mode = mode; } - /// [Required] N-Cross validations value. + /// + /// [Required] N-Cross validations value. + /// Serialized Name: CustomNCrossValidations.value + /// public int Value { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomSeasonality.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomSeasonality.cs index 6a6af48cb845..a035cf4df68c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomSeasonality.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomSeasonality.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The CustomSeasonality. - public partial class CustomSeasonality : Seasonality + /// + /// The CustomSeasonality. + /// Serialized Name: CustomSeasonality + /// + public partial class CustomSeasonality : ForecastingSeasonality { /// Initializes a new instance of CustomSeasonality. - /// [Required] Seasonality value. + /// + /// [Required] Seasonality value. + /// Serialized Name: CustomSeasonality.value + /// public CustomSeasonality(int value) { Value = value; @@ -19,15 +25,24 @@ public CustomSeasonality(int value) } /// Initializes a new instance of CustomSeasonality. - /// [Required] Seasonality mode. - /// [Required] Seasonality value. + /// + /// [Required] Seasonality mode. + /// Serialized Name: Seasonality.mode + /// + /// + /// [Required] Seasonality value. + /// Serialized Name: CustomSeasonality.value + /// internal CustomSeasonality(SeasonalityMode mode, int value) : base(mode) { Value = value; Mode = mode; } - /// [Required] Seasonality value. + /// + /// [Required] Seasonality value. + /// Serialized Name: CustomSeasonality.value + /// public int Value { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetLags.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetLags.cs index e962390f9b07..819295a6e7ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetLags.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetLags.cs @@ -12,11 +12,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The CustomTargetLags. + /// + /// The CustomTargetLags. + /// Serialized Name: CustomTargetLags + /// public partial class CustomTargetLags : TargetLags { /// Initializes a new instance of CustomTargetLags. - /// [Required] Set target lags values. + /// + /// [Required] Set target lags values. + /// Serialized Name: CustomTargetLags.values + /// /// is null. public CustomTargetLags(IEnumerable values) { @@ -27,15 +33,24 @@ public CustomTargetLags(IEnumerable values) } /// Initializes a new instance of CustomTargetLags. - /// [Required] Set target lags mode - Auto/Custom. - /// [Required] Set target lags values. + /// + /// [Required] Set target lags mode - Auto/Custom + /// Serialized Name: TargetLags.mode + /// + /// + /// [Required] Set target lags values. + /// Serialized Name: CustomTargetLags.values + /// internal CustomTargetLags(TargetLagsMode mode, IList values) : base(mode) { Values = values; Mode = mode; } - /// [Required] Set target lags values. + /// + /// [Required] Set target lags values. + /// Serialized Name: CustomTargetLags.values + /// public IList Values { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetRollingWindowSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetRollingWindowSize.cs index 3cfea84197da..49abe3089f3e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetRollingWindowSize.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/CustomTargetRollingWindowSize.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The CustomTargetRollingWindowSize. + /// + /// The CustomTargetRollingWindowSize. + /// Serialized Name: CustomTargetRollingWindowSize + /// public partial class CustomTargetRollingWindowSize : TargetRollingWindowSize { /// Initializes a new instance of CustomTargetRollingWindowSize. - /// [Required] TargetRollingWindowSize value. + /// + /// [Required] TargetRollingWindowSize value. + /// Serialized Name: CustomTargetRollingWindowSize.value + /// public CustomTargetRollingWindowSize(int value) { Value = value; @@ -19,15 +25,24 @@ public CustomTargetRollingWindowSize(int value) } /// Initializes a new instance of CustomTargetRollingWindowSize. - /// [Required] TargetRollingWindowSiz detection mode. - /// [Required] TargetRollingWindowSize value. + /// + /// [Required] TargetRollingWindowSiz detection mode. + /// Serialized Name: TargetRollingWindowSize.mode + /// + /// + /// [Required] TargetRollingWindowSize value. + /// Serialized Name: CustomTargetRollingWindowSize.value + /// internal CustomTargetRollingWindowSize(TargetRollingWindowSizeMode mode, int value) : base(mode) { Value = value; Mode = mode; } - /// [Required] TargetRollingWindowSize value. + /// + /// [Required] TargetRollingWindowSize value. + /// Serialized Name: CustomTargetRollingWindowSize.value + /// public int Value { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerData.Serialization.cs deleted file mode 100644 index cb82f798a36f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class DataContainerData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataContainerData DeserializeDataContainerData(JsonElement element) - { - DataContainerProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = DataContainerProperties.DeserializeDataContainerProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new DataContainerData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerProperties.Serialization.cs deleted file mode 100644 index 36818a74ba39..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerProperties.Serialization.cs +++ /dev/null @@ -1,181 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DataContainerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("dataType"); - writer.WriteStringValue(DataType.ToString()); - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static DataContainerProperties DeserializeDataContainerProperties(JsonElement element) - { - DataType dataType = default; - Optional isArchived = default; - Optional latestVersion = default; - Optional nextVersion = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataType")) - { - dataType = new DataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("latestVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - latestVersion = null; - continue; - } - latestVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nextVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nextVersion = null; - continue; - } - nextVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new DataContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, dataType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerProperties.cs deleted file mode 100644 index 363d0efc43f5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerProperties.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Container for data asset versions. - public partial class DataContainerProperties : AssetContainer - { - /// Initializes a new instance of DataContainerProperties. - /// [Required] Specifies the type of data. - public DataContainerProperties(DataType dataType) - { - DataType = dataType; - } - - /// Initializes a new instance of DataContainerProperties. - /// 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. - internal DataContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, DataType dataType) : base(description, properties, tags, isArchived, latestVersion, nextVersion) - { - DataType = dataType; - } - - /// [Required] Specifies the type of data. - public DataType DataType { 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 ff30e184f7d2..17b5ddb48dfe 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 @@ -17,7 +17,7 @@ internal partial class DataContainerResourceArmPaginatedResult internal static DataContainerResourceArmPaginatedResult DeserializeDataContainerResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static DataContainerResourceArmPaginatedResult DeserializeDataContainer property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DataContainerData.DeserializeDataContainerData(item)); + array.Add(MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(item)); } value = array; continue; 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 fe275934eea5..20c3d060e968 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataContainerResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of DataContainer entities. + /// + /// A paginated list of DataContainer entities. + /// Serialized Name: DataContainerResourceArmPaginatedResult + /// internal partial class DataContainerResourceArmPaginatedResult { /// Initializes a new instance of DataContainerResourceArmPaginatedResult. internal DataContainerResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of DataContainerResourceArmPaginatedResult. - /// The link to the next page of DataContainer objects. If null, there are no additional pages. - /// An array of objects of type DataContainer. - internal DataContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of DataContainer objects. If null, there are no additional pages. + /// Serialized Name: DataContainerResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type DataContainer. + /// Serialized Name: DataContainerResourceArmPaginatedResult.value + /// + internal DataContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of DataContainer objects. If null, there are no additional pages. + /// + /// The link to the next page of DataContainer objects. If null, there are no additional pages. + /// Serialized Name: DataContainerResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type DataContainer. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type DataContainer. + /// Serialized Name: DataContainerResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataFactoryCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataFactoryCompute.Serialization.cs deleted file mode 100644 index cdbf25116fb4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataFactoryCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DataFactoryCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static DataFactoryCompute DeserializeDataFactoryCompute(JsonElement element) - { - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new DataFactoryCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataFactoryCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataFactoryCompute.cs deleted file mode 100644 index c682be47ae9a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataFactoryCompute.cs +++ /dev/null @@ -1,39 +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 -{ - /// A DataFactory compute. - public partial class DataFactoryCompute : Compute - { - /// Initializes a new instance of DataFactoryCompute. - public DataFactoryCompute() - { - ComputeType = ComputeType.DataFactory; - } - - /// Initializes a new instance of DataFactoryCompute. - /// 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. - internal DataFactoryCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - ComputeType = computeType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsCompute.Serialization.cs deleted file mode 100644 index 1a150205d05b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DataLakeAnalyticsCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static DataLakeAnalyticsCompute DeserializeDataLakeAnalyticsCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = DataLakeAnalyticsSchemaProperties.DeserializeDataLakeAnalyticsSchemaProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new DataLakeAnalyticsCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsCompute.cs deleted file mode 100644 index d93622cb1400..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsCompute.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; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// A DataLakeAnalytics compute. - public partial class DataLakeAnalyticsCompute : Compute - { - /// Initializes a new instance of DataLakeAnalyticsCompute. - public DataLakeAnalyticsCompute() - { - ComputeType = ComputeType.DataLakeAnalytics; - } - - /// Initializes a new instance of DataLakeAnalyticsCompute. - /// 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. - /// - internal DataLakeAnalyticsCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, DataLakeAnalyticsSchemaProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// Gets or sets the properties. - internal DataLakeAnalyticsSchemaProperties Properties { get; set; } - /// DataLake Store Account Name. - public string DataLakeStoreAccountName - { - get => Properties is null ? default : Properties.DataLakeStoreAccountName; - set - { - if (Properties is null) - Properties = new DataLakeAnalyticsSchemaProperties(); - Properties.DataLakeStoreAccountName = value; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsSchemaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsSchemaProperties.Serialization.cs deleted file mode 100644 index 25c9a7707608..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsSchemaProperties.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class DataLakeAnalyticsSchemaProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DataLakeStoreAccountName)) - { - writer.WritePropertyName("dataLakeStoreAccountName"); - writer.WriteStringValue(DataLakeStoreAccountName); - } - writer.WriteEndObject(); - } - - internal static DataLakeAnalyticsSchemaProperties DeserializeDataLakeAnalyticsSchemaProperties(JsonElement element) - { - Optional dataLakeStoreAccountName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataLakeStoreAccountName")) - { - dataLakeStoreAccountName = property.Value.GetString(); - continue; - } - } - return new DataLakeAnalyticsSchemaProperties(dataLakeStoreAccountName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsSchemaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsSchemaProperties.cs deleted file mode 100644 index 9065db862ba4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataLakeAnalyticsSchemaProperties.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DataLakeAnalyticsSchemaProperties. - internal partial class DataLakeAnalyticsSchemaProperties - { - /// Initializes a new instance of DataLakeAnalyticsSchemaProperties. - public DataLakeAnalyticsSchemaProperties() - { - } - - /// Initializes a new instance of DataLakeAnalyticsSchemaProperties. - /// DataLake Store Account Name. - internal DataLakeAnalyticsSchemaProperties(string dataLakeStoreAccountName) - { - DataLakeStoreAccountName = dataLakeStoreAccountName; - } - - /// DataLake Store Account Name. - public string DataLakeStoreAccountName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataPathAssetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataPathAssetReference.Serialization.cs deleted file mode 100644 index bf4d6012f944..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataPathAssetReference.Serialization.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DataPathAssetReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DatastoreId)) - { - if (DatastoreId != null) - { - writer.WritePropertyName("datastoreId"); - writer.WriteStringValue(DatastoreId); - } - else - { - writer.WriteNull("datastoreId"); - } - } - if (Optional.IsDefined(Path)) - { - if (Path != null) - { - writer.WritePropertyName("path"); - writer.WriteStringValue(Path); - } - else - { - writer.WriteNull("path"); - } - } - writer.WritePropertyName("referenceType"); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WriteEndObject(); - } - - internal static DataPathAssetReference DeserializeDataPathAssetReference(JsonElement element) - { - Optional datastoreId = default; - Optional path = default; - ReferenceType referenceType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("datastoreId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - datastoreId = null; - continue; - } - datastoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("path")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - path = null; - continue; - } - path = property.Value.GetString(); - continue; - } - if (property.NameEquals("referenceType")) - { - referenceType = new ReferenceType(property.Value.GetString()); - continue; - } - } - return new DataPathAssetReference(referenceType, datastoreId.Value, path.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataPathAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataPathAssetReference.cs deleted file mode 100644 index a3de419cb6e5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataPathAssetReference.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Reference to an asset via its path in a datastore. - public partial class DataPathAssetReference : AssetReferenceBase - { - /// Initializes a new instance of DataPathAssetReference. - public DataPathAssetReference() - { - ReferenceType = ReferenceType.DataPath; - } - - /// Initializes a new instance of DataPathAssetReference. - /// [Required] Specifies the type of asset reference. - /// ARM resource ID of the datastore where the asset is located. - /// The path of the file/directory in the datastore. - internal DataPathAssetReference(ReferenceType referenceType, string datastoreId, string path) : base(referenceType) - { - DatastoreId = datastoreId; - Path = path; - 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataType.cs deleted file mode 100644 index 11fc3a9c2183..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataType.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 -{ - /// Enum to determine the type of data. - public readonly partial struct DataType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DataType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UriFileValue = "uri_file"; - private const string UriFolderValue = "uri_folder"; - private const string MltableValue = "mltable"; - - /// uri_file. - public static DataType UriFile { get; } = new DataType(UriFileValue); - /// uri_folder. - public static DataType UriFolder { get; } = new DataType(UriFolderValue); - /// mltable. - public static DataType Mltable { get; } = new DataType(MltableValue); - /// Determines if two values are the same. - public static bool operator ==(DataType left, DataType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DataType left, DataType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DataType(string value) => new DataType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DataType other && Equals(other); - /// - public bool Equals(DataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} 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 2445e509f21d..cc8d6f4936d5 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 @@ -17,7 +17,7 @@ internal partial class DataVersionBaseResourceArmPaginatedResult internal static DataVersionBaseResourceArmPaginatedResult DeserializeDataVersionBaseResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static DataVersionBaseResourceArmPaginatedResult DeserializeDataVersion property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DataVersionData.DeserializeDataVersionData(item)); + array.Add(MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(item)); } value = array; continue; 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 789ac17e6962..719dd3e25aca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionBaseResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of DataVersionBase entities. + /// + /// A paginated list of DataVersionBase entities. + /// Serialized Name: DataVersionBaseResourceArmPaginatedResult + /// internal partial class DataVersionBaseResourceArmPaginatedResult { /// Initializes a new instance of DataVersionBaseResourceArmPaginatedResult. internal DataVersionBaseResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of DataVersionBaseResourceArmPaginatedResult. - /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. - /// An array of objects of type DataVersionBase. - internal DataVersionBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. + /// Serialized Name: DataVersionBaseResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type DataVersionBase. + /// Serialized Name: DataVersionBaseResourceArmPaginatedResult.value + /// + internal DataVersionBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. + /// + /// The link to the next page of DataVersionBase objects. If null, there are no additional pages. + /// Serialized Name: DataVersionBaseResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type DataVersionBase. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type DataVersionBase. + /// Serialized Name: DataVersionBaseResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionData.Serialization.cs deleted file mode 100644 index 6111721d0017..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class DataVersionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DataVersionData DeserializeDataVersionData(JsonElement element) - { - DataVersionProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = DataVersionProperties.DeserializeDataVersionProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new DataVersionData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.Serialization.cs deleted file mode 100644 index ec23dc9c3c0d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.Serialization.cs +++ /dev/null @@ -1,193 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DataVersionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("dataType"); - writer.WriteStringValue(DataType.ToString()); - writer.WritePropertyName("dataUri"); - writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static DataVersionProperties DeserializeDataVersionProperties(JsonElement element) - { - if (element.TryGetProperty("dataType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "mltable": return MLTableData.DeserializeMLTableData(element); - case "uri_file": return UriFileDataVersion.DeserializeUriFileDataVersion(element); - case "uri_folder": return UriFolderDataVersion.DeserializeUriFolderDataVersion(element); - } - } - DataType dataType = default; - Uri dataUri = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataType")) - { - dataType = new DataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataUri")) - { - dataUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new DataVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.cs deleted file mode 100644 index 7365c3cc3cc2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DataVersionProperties.cs +++ /dev/null @@ -1,50 +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 -{ - /// - /// Data version base definition - /// Please note is the base class. According to the scenario, a derived class 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 partial class DataVersionProperties : AssetBase - { - /// Initializes a new instance of DataVersionProperties. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - /// is null. - public DataVersionProperties(Uri dataUri) - { - Argument.AssertNotNull(dataUri, nameof(dataUri)); - - DataUri = dataUri; - } - - /// Initializes a new instance of DataVersionProperties. - /// 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?. - /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - internal DataVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, DataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived) - { - DataType = dataType; - DataUri = dataUri; - } - - /// [Required] Specifies the type of data. - internal DataType DataType { get; set; } - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - public Uri DataUri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksCompute.Serialization.cs deleted file mode 100644 index c6d8166b53ab..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DatabricksCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static DatabricksCompute DeserializeDatabricksCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = DatabricksProperties.DeserializeDatabricksProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new DatabricksCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksCompute.cs deleted file mode 100644 index ab01ddbfc641..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksCompute.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 -{ - /// A DataFactory compute. - public partial class DatabricksCompute : Compute - { - /// Initializes a new instance of DatabricksCompute. - public DatabricksCompute() - { - ComputeType = ComputeType.Databricks; - } - - /// Initializes a new instance of DatabricksCompute. - /// 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. - /// Properties of Databricks. - internal DatabricksCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, DatabricksProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// Properties of Databricks. - public DatabricksProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs deleted file mode 100644 index 922cd563f62c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksComputeSecrets.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DatabricksComputeSecrets - { - internal static DatabricksComputeSecrets DeserializeDatabricksComputeSecrets(JsonElement element) - { - Optional databricksAccessToken = default; - ComputeType computeType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("databricksAccessToken")) - { - databricksAccessToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - } - return new DatabricksComputeSecrets(computeType, databricksAccessToken.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksComputeSecrets.cs deleted file mode 100644 index 5c5f4d586b5c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksComputeSecrets.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Secrets related to a Machine Learning compute based on Databricks. - public partial class DatabricksComputeSecrets : ComputeSecrets - { - /// Initializes a new instance of DatabricksComputeSecrets. - internal DatabricksComputeSecrets() - { - ComputeType = ComputeType.Databricks; - } - - /// Initializes a new instance of DatabricksComputeSecrets. - /// The type of compute. - /// access token for databricks account. - internal DatabricksComputeSecrets(ComputeType computeType, string databricksAccessToken) : base(computeType) - { - DatabricksAccessToken = databricksAccessToken; - ComputeType = computeType; - } - - /// access token for databricks account. - public string DatabricksAccessToken { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksProperties.Serialization.cs deleted file mode 100644 index 641da3d36e17..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksProperties.Serialization.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DatabricksProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DatabricksAccessToken)) - { - writer.WritePropertyName("databricksAccessToken"); - writer.WriteStringValue(DatabricksAccessToken); - } - if (Optional.IsDefined(WorkspaceUri)) - { - writer.WritePropertyName("workspaceUrl"); - writer.WriteStringValue(WorkspaceUri.AbsoluteUri); - } - writer.WriteEndObject(); - } - - internal static DatabricksProperties DeserializeDatabricksProperties(JsonElement element) - { - Optional databricksAccessToken = default; - Optional workspaceUrl = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("databricksAccessToken")) - { - databricksAccessToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("workspaceUrl")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - workspaceUrl = null; - continue; - } - workspaceUrl = new Uri(property.Value.GetString()); - continue; - } - } - return new DatabricksProperties(databricksAccessToken.Value, workspaceUrl.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksProperties.cs deleted file mode 100644 index 8d04777542e5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatabricksProperties.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Properties of Databricks. - public partial class DatabricksProperties - { - /// Initializes a new instance of DatabricksProperties. - public DatabricksProperties() - { - } - - /// Initializes a new instance of DatabricksProperties. - /// Databricks access token. - /// Workspace Url. - internal DatabricksProperties(string databricksAccessToken, Uri workspaceUri) - { - DatabricksAccessToken = databricksAccessToken; - WorkspaceUri = workspaceUri; - } - - /// Databricks access token. - public string DatabricksAccessToken { get; set; } - /// Workspace Url. - public Uri WorkspaceUri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreCredentials.Serialization.cs deleted file mode 100644 index afcb6240bd8b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("credentialsType"); - writer.WriteStringValue(CredentialsType.ToString()); - writer.WriteEndObject(); - } - - internal static DatastoreCredentials DeserializeDatastoreCredentials(JsonElement element) - { - if (element.TryGetProperty("credentialsType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AccountKey": return AccountKeyDatastoreCredentials.DeserializeAccountKeyDatastoreCredentials(element); - case "Certificate": return CertificateDatastoreCredentials.DeserializeCertificateDatastoreCredentials(element); - case "None": return NoneDatastoreCredentials.DeserializeNoneDatastoreCredentials(element); - case "Sas": return SasDatastoreCredentials.DeserializeSasDatastoreCredentials(element); - case "ServicePrincipal": return ServicePrincipalDatastoreCredentials.DeserializeServicePrincipalDatastoreCredentials(element); - } - } - return UnknownDatastoreCredentials.DeserializeUnknownDatastoreCredentials(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreCredentials.cs deleted file mode 100644 index e81d0a0edde6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreCredentials.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Base definition for datastore 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 abstract partial class DatastoreCredentials - { - /// Initializes a new instance of DatastoreCredentials. - protected DatastoreCredentials() - { - } - - /// Initializes a new instance of DatastoreCredentials. - /// [Required] Credential type used to authentication with storage. - internal DatastoreCredentials(CredentialsType credentialsType) - { - CredentialsType = credentialsType; - } - - /// [Required] Credential type used to authentication with storage. - internal CredentialsType CredentialsType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreData.Serialization.cs deleted file mode 100644 index ee76cadd1903..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class DatastoreData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static DatastoreData DeserializeDatastoreData(JsonElement element) - { - DatastoreProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = DatastoreProperties.DeserializeDatastoreProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new DatastoreData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreProperties.Serialization.cs deleted file mode 100644 index 977836fc8b19..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreProperties.Serialization.cs +++ /dev/null @@ -1,172 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DatastoreProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - writer.WritePropertyName("datastoreType"); - writer.WriteStringValue(DatastoreType.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static DatastoreProperties DeserializeDatastoreProperties(JsonElement element) - { - if (element.TryGetProperty("datastoreType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AzureBlob": return AzureBlobDatastore.DeserializeAzureBlobDatastore(element); - case "AzureDataLakeGen1": return AzureDataLakeGen1Datastore.DeserializeAzureDataLakeGen1Datastore(element); - case "AzureDataLakeGen2": return AzureDataLakeGen2Datastore.DeserializeAzureDataLakeGen2Datastore(element); - case "AzureFile": return AzureFileDatastore.DeserializeAzureFileDatastore(element); - } - } - DatastoreCredentials credentials = default; - DatastoreType datastoreType = default; - Optional isDefault = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - credentials = DatastoreCredentials.DeserializeDatastoreCredentials(property.Value); - continue; - } - if (property.NameEquals("datastoreType")) - { - datastoreType = new DatastoreType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isDefault")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isDefault = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new DatastoreProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreProperties.cs deleted file mode 100644 index 4ea383e81f83..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreProperties.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; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Base definition for datastore contents configuration. - /// Please note is the base class. According to the scenario, a derived class 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 partial class DatastoreProperties : ResourceBase - { - /// Initializes a new instance of DatastoreProperties. - /// - /// [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 . - /// - /// is null. - public DatastoreProperties(DatastoreCredentials credentials) - { - Argument.AssertNotNull(credentials, nameof(credentials)); - - Credentials = credentials; - } - - /// Initializes a new instance of DatastoreProperties. - /// 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 . - /// - /// [Required] Storage type backing the datastore. - /// Readonly property to indicate if datastore is the workspace default datastore. - internal DatastoreProperties(string description, IDictionary properties, IDictionary tags, DatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault) : base(description, properties, tags) - { - Credentials = credentials; - DatastoreType = datastoreType; - IsDefault = isDefault; - } - - /// - /// [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 DatastoreCredentials 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/DatastoreResourceArmPaginatedResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.Serialization.cs index 567dc82ed535..53f379b11e9e 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 @@ -17,7 +17,7 @@ internal partial class DatastoreResourceArmPaginatedResult internal static DatastoreResourceArmPaginatedResult DeserializeDatastoreResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static DatastoreResourceArmPaginatedResult DeserializeDatastoreResource property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DatastoreData.DeserializeDatastoreData(item)); + array.Add(MachineLearningDatastoreData.DeserializeMachineLearningDatastoreData(item)); } value = array; continue; 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 d4c177ee04af..c834afbc3e31 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of Datastore entities. + /// + /// A paginated list of Datastore entities. + /// Serialized Name: DatastoreResourceArmPaginatedResult + /// internal partial class DatastoreResourceArmPaginatedResult { /// Initializes a new instance of DatastoreResourceArmPaginatedResult. internal DatastoreResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of DatastoreResourceArmPaginatedResult. - /// The link to the next page of Datastore objects. If null, there are no additional pages. - /// An array of objects of type Datastore. - internal DatastoreResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of Datastore objects. If null, there are no additional pages. + /// Serialized Name: DatastoreResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type Datastore. + /// Serialized Name: DatastoreResourceArmPaginatedResult.value + /// + internal DatastoreResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of Datastore objects. If null, there are no additional pages. + /// + /// The link to the next page of Datastore objects. If null, there are no additional pages. + /// Serialized Name: DatastoreResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type Datastore. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type Datastore. + /// Serialized Name: DatastoreResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreSecrets.Serialization.cs deleted file mode 100644 index ff9112f7e4e6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreSecrets.Serialization.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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DatastoreSecrets : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("secretsType"); - writer.WriteStringValue(SecretsType.ToString()); - writer.WriteEndObject(); - } - - internal static DatastoreSecrets DeserializeDatastoreSecrets(JsonElement element) - { - if (element.TryGetProperty("secretsType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Certificate": return CertificateDatastoreSecrets.DeserializeCertificateDatastoreSecrets(element); - case "Sas": return SasDatastoreSecrets.DeserializeSasDatastoreSecrets(element); - case "ServicePrincipal": return ServicePrincipalDatastoreSecrets.DeserializeServicePrincipalDatastoreSecrets(element); - case "AccountKey": return AccountKeyDatastoreSecrets.DeserializeAccountKeyDatastoreSecrets(element); - } - } - return UnknownDatastoreSecrets.DeserializeUnknownDatastoreSecrets(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreSecrets.cs deleted file mode 100644 index 4e01e106e5ed..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreSecrets.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Base definition for datastore secrets. - /// Please note is the base class. According to the scenario, a derived class 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 DatastoreSecrets - { - /// Initializes a new instance of DatastoreSecrets. - protected DatastoreSecrets() - { - } - - /// Initializes a new instance of DatastoreSecrets. - /// [Required] Credential type used to authentication with storage. - internal DatastoreSecrets(SecretsType secretsType) - { - SecretsType = secretsType; - } - - /// [Required] Credential type used to authentication with storage. - internal SecretsType SecretsType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs index 0f3b08b127a8..e8afa318e60c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DatastoreType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the datastore contents type. + /// + /// Enum to determine the datastore contents type. + /// Serialized Name: DatastoreType + /// internal readonly partial struct DatastoreType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public DatastoreType(string value) private const string AzureDataLakeGen2Value = "AzureDataLakeGen2"; private const string AzureFileValue = "AzureFile"; - /// AzureBlob. + /// + /// AzureBlob + /// Serialized Name: DatastoreType.AzureBlob + /// public static DatastoreType AzureBlob { get; } = new DatastoreType(AzureBlobValue); - /// AzureDataLakeGen1. + /// + /// AzureDataLakeGen1 + /// Serialized Name: DatastoreType.AzureDataLakeGen1 + /// public static DatastoreType AzureDataLakeGen1 { get; } = new DatastoreType(AzureDataLakeGen1Value); - /// AzureDataLakeGen2. + /// + /// AzureDataLakeGen2 + /// Serialized Name: DatastoreType.AzureDataLakeGen2 + /// public static DatastoreType AzureDataLakeGen2 { get; } = new DatastoreType(AzureDataLakeGen2Value); - /// AzureFile. + /// + /// AzureFile + /// Serialized Name: DatastoreType.AzureFile + /// public static DatastoreType AzureFile { get; } = new DatastoreType(AzureFileValue); /// Determines if two values are the same. public static bool operator ==(DatastoreType left, DatastoreType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultScaleSettings.Serialization.cs deleted file mode 100644 index 726ca4ee1047..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultScaleSettings.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DefaultScaleSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("scaleType"); - writer.WriteStringValue(ScaleType.ToString()); - writer.WriteEndObject(); - } - - internal static DefaultScaleSettings DeserializeDefaultScaleSettings(JsonElement element) - { - ScaleType scaleType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scaleType")) - { - scaleType = new ScaleType(property.Value.GetString()); - continue; - } - } - return new DefaultScaleSettings(scaleType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultScaleSettings.cs deleted file mode 100644 index d15cf7d3ac1c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DefaultScaleSettings.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DefaultScaleSettings. - public partial class DefaultScaleSettings : OnlineScaleSettings - { - /// Initializes a new instance of DefaultScaleSettings. - public DefaultScaleSettings() - { - ScaleType = ScaleType.Default; - } - - /// Initializes a new instance of DefaultScaleSettings. - /// [Required] Type of deployment scaling algorithm. - internal DefaultScaleSettings(ScaleType scaleType) : base(scaleType) - { - ScaleType = scaleType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogs.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogs.Serialization.cs deleted file mode 100644 index 5312b01a3efa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogs.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DeploymentLogs - { - internal static DeploymentLogs DeserializeDeploymentLogs(JsonElement element) - { - Optional content = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("content")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - content = null; - continue; - } - content = property.Value.GetString(); - continue; - } - } - return new DeploymentLogs(content.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogs.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogs.cs deleted file mode 100644 index d0fc4288ea8b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogs.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DeploymentLogs. - public partial class DeploymentLogs - { - /// Initializes a new instance of DeploymentLogs. - internal DeploymentLogs() - { - } - - /// Initializes a new instance of DeploymentLogs. - /// The retrieved online deployment logs. - internal DeploymentLogs(string content) - { - Content = content; - } - - /// The retrieved online deployment logs. - public string Content { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogsContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogsContent.Serialization.cs deleted file mode 100644 index 1b9f273af98c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogsContent.Serialization.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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DeploymentLogsContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContainerType)) - { - writer.WritePropertyName("containerType"); - writer.WriteStringValue(ContainerType.Value.ToString()); - } - if (Optional.IsDefined(Tail)) - { - if (Tail != null) - { - writer.WritePropertyName("tail"); - writer.WriteNumberValue(Tail.Value); - } - else - { - writer.WriteNull("tail"); - } - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogsContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogsContent.cs deleted file mode 100644 index 60515daf0518..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentLogsContent.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DeploymentLogsContent. - public partial class DeploymentLogsContent - { - /// Initializes a new instance of DeploymentLogsContent. - public DeploymentLogsContent() - { - } - - /// The type of container to retrieve logs from. - public ContainerType? ContainerType { get; set; } - /// The maximum number of lines to tail. - public int? Tail { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentProvisioningState.cs deleted file mode 100644 index 4591895ee96d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentProvisioningState.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.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Possible values for DeploymentProvisioningState. - public readonly partial struct DeploymentProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DeploymentProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatingValue = "Creating"; - private const string DeletingValue = "Deleting"; - private const string ScalingValue = "Scaling"; - private const string UpdatingValue = "Updating"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Creating. - public static DeploymentProvisioningState Creating { get; } = new DeploymentProvisioningState(CreatingValue); - /// Deleting. - public static DeploymentProvisioningState Deleting { get; } = new DeploymentProvisioningState(DeletingValue); - /// Scaling. - public static DeploymentProvisioningState Scaling { get; } = new DeploymentProvisioningState(ScalingValue); - /// Updating. - public static DeploymentProvisioningState Updating { get; } = new DeploymentProvisioningState(UpdatingValue); - /// Succeeded. - public static DeploymentProvisioningState Succeeded { get; } = new DeploymentProvisioningState(SucceededValue); - /// Failed. - public static DeploymentProvisioningState Failed { get; } = new DeploymentProvisioningState(FailedValue); - /// Canceled. - public static DeploymentProvisioningState Canceled { get; } = new DeploymentProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(DeploymentProvisioningState left, DeploymentProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DeploymentProvisioningState left, DeploymentProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DeploymentProvisioningState(string value) => new DeploymentProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DeploymentProvisioningState other && Equals(other); - /// - public bool Equals(DeploymentProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentResourceConfiguration.Serialization.cs deleted file mode 100644 index 148661b7977f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentResourceConfiguration.Serialization.cs +++ /dev/null @@ -1,108 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DeploymentResourceConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"); - writer.WriteNumberValue(InstanceCount.Value); - } - if (Optional.IsDefined(InstanceType)) - { - if (InstanceType != null) - { - writer.WritePropertyName("instanceType"); - writer.WriteStringValue(InstanceType); - } - else - { - writer.WriteNull("instanceType"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static DeploymentResourceConfiguration DeserializeDeploymentResourceConfiguration(JsonElement element) - { - Optional instanceCount = default; - Optional instanceType = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("instanceCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - instanceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("instanceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instanceType = null; - continue; - } - instanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); - } - properties = dictionary; - continue; - } - } - return new DeploymentResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentResourceConfiguration.cs deleted file mode 100644 index af46b8d3ca4d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DeploymentResourceConfiguration.cs +++ /dev/null @@ -1,29 +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 DeploymentResourceConfiguration. - public partial class DeploymentResourceConfiguration : ResourceConfiguration - { - /// Initializes a new instance of DeploymentResourceConfiguration. - public DeploymentResourceConfiguration() - { - } - - /// Initializes a new instance of DeploymentResourceConfiguration. - /// Optional number of instances or nodes used by the compute target. - /// Optional type of VM used as supported by the compute target. - /// Additional properties bag. - internal DeploymentResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties) : base(instanceCount, instanceType, properties) - { - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseRequestProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseRequestProperties.Serialization.cs deleted file mode 100644 index aeb27c7d09c7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseRequestProperties.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DiagnoseRequestProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Udr)) - { - writer.WritePropertyName("udr"); - writer.WriteStartObject(); - foreach (var item in Udr) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Nsg)) - { - writer.WritePropertyName("nsg"); - writer.WriteStartObject(); - foreach (var item in Nsg) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ResourceLock)) - { - writer.WritePropertyName("resourceLock"); - writer.WriteStartObject(); - foreach (var item in ResourceLock) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(DnsResolution)) - { - writer.WritePropertyName("dnsResolution"); - writer.WriteStartObject(); - foreach (var item in DnsResolution) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(StorageAccount)) - { - writer.WritePropertyName("storageAccount"); - writer.WriteStartObject(); - foreach (var item in StorageAccount) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(KeyVault)) - { - writer.WritePropertyName("keyVault"); - writer.WriteStartObject(); - foreach (var item in KeyVault) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ContainerRegistry)) - { - writer.WritePropertyName("containerRegistry"); - writer.WriteStartObject(); - foreach (var item in ContainerRegistry) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ApplicationInsights)) - { - writer.WritePropertyName("applicationInsights"); - writer.WriteStartObject(); - foreach (var item in ApplicationInsights) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Others)) - { - writer.WritePropertyName("others"); - writer.WriteStartObject(); - foreach (var item in Others) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseRequestProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseRequestProperties.cs deleted file mode 100644 index 362123850ed4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseRequestProperties.cs +++ /dev/null @@ -1,311 +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 DiagnoseRequestProperties. - public partial class DiagnoseRequestProperties - { - /// Initializes a new instance of DiagnoseRequestProperties. - public DiagnoseRequestProperties() - { - Udr = new ChangeTrackingDictionary(); - Nsg = new ChangeTrackingDictionary(); - ResourceLock = new ChangeTrackingDictionary(); - DnsResolution = new ChangeTrackingDictionary(); - StorageAccount = new ChangeTrackingDictionary(); - KeyVault = new ChangeTrackingDictionary(); - ContainerRegistry = new ChangeTrackingDictionary(); - ApplicationInsights = new ChangeTrackingDictionary(); - Others = new ChangeTrackingDictionary(); - } - - /// - /// Setting for diagnosing user defined routing - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 Udr { get; } - /// - /// Setting for diagnosing network security group - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 Nsg { get; } - /// - /// Setting for diagnosing resource lock - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 ResourceLock { get; } - /// - /// Setting for diagnosing dns resolution - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 DnsResolution { get; } - /// - /// Setting for diagnosing dependent storage account - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 StorageAccount { get; } - /// - /// Setting for diagnosing dependent key vault - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 KeyVault { get; } - /// - /// Setting for diagnosing dependent container registry - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 ContainerRegistry { get; } - /// - /// Setting for diagnosing dependent application insights - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 unclassified category of problems - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 Others { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResult.Serialization.cs deleted file mode 100644 index fd451bde1ef2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResult.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DiagnoseResponseResult - { - internal static DiagnoseResponseResult DeserializeDiagnoseResponseResult(JsonElement element) - { - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - value = DiagnoseResponseResultValue.DeserializeDiagnoseResponseResultValue(property.Value); - continue; - } - } - return new DiagnoseResponseResult(value.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResult.cs deleted file mode 100644 index 5d7a8dcbf11a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResult.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DiagnoseResponseResult. - public partial class DiagnoseResponseResult - { - /// Initializes a new instance of DiagnoseResponseResult. - internal DiagnoseResponseResult() - { - } - - /// Initializes a new instance of DiagnoseResponseResult. - /// - internal DiagnoseResponseResult(DiagnoseResponseResultValue value) - { - Value = value; - } - - /// Gets the value. - public DiagnoseResponseResultValue Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResultValue.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResultValue.Serialization.cs deleted file mode 100644 index ba1a2c7cfdb9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResultValue.Serialization.cs +++ /dev/null @@ -1,168 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DiagnoseResponseResultValue - { - internal static DiagnoseResponseResultValue DeserializeDiagnoseResponseResultValue(JsonElement element) - { - Optional> userDefinedRouteResults = default; - Optional> networkSecurityRuleResults = default; - Optional> resourceLockResults = default; - Optional> dnsResolutionResults = default; - Optional> storageAccountResults = default; - Optional> keyVaultResults = default; - Optional> containerRegistryResults = default; - Optional> applicationInsightsResults = default; - Optional> otherResults = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userDefinedRouteResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - userDefinedRouteResults = array; - continue; - } - if (property.NameEquals("networkSecurityRuleResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - networkSecurityRuleResults = array; - continue; - } - if (property.NameEquals("resourceLockResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - resourceLockResults = array; - continue; - } - if (property.NameEquals("dnsResolutionResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - dnsResolutionResults = array; - continue; - } - if (property.NameEquals("storageAccountResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - storageAccountResults = array; - continue; - } - if (property.NameEquals("keyVaultResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - keyVaultResults = array; - continue; - } - if (property.NameEquals("containerRegistryResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - containerRegistryResults = array; - continue; - } - if (property.NameEquals("applicationInsightsResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - applicationInsightsResults = array; - continue; - } - if (property.NameEquals("otherResults")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(DiagnoseResult.DeserializeDiagnoseResult(item)); - } - otherResults = array; - continue; - } - } - return new DiagnoseResponseResultValue(Optional.ToList(userDefinedRouteResults), Optional.ToList(networkSecurityRuleResults), Optional.ToList(resourceLockResults), Optional.ToList(dnsResolutionResults), Optional.ToList(storageAccountResults), Optional.ToList(keyVaultResults), Optional.ToList(containerRegistryResults), Optional.ToList(applicationInsightsResults), Optional.ToList(otherResults)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResultValue.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResultValue.cs deleted file mode 100644 index d2fc19cf4d91..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResponseResultValue.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The DiagnoseResponseResultValue. - public partial class DiagnoseResponseResultValue - { - /// Initializes a new instance of DiagnoseResponseResultValue. - internal DiagnoseResponseResultValue() - { - UserDefinedRouteResults = new ChangeTrackingList(); - NetworkSecurityRuleResults = new ChangeTrackingList(); - ResourceLockResults = new ChangeTrackingList(); - DnsResolutionResults = new ChangeTrackingList(); - StorageAccountResults = new ChangeTrackingList(); - KeyVaultResults = new ChangeTrackingList(); - ContainerRegistryResults = new ChangeTrackingList(); - ApplicationInsightsResults = new ChangeTrackingList(); - OtherResults = new ChangeTrackingList(); - } - - /// Initializes a new instance of DiagnoseResponseResultValue. - /// - /// - /// - /// - /// - /// - /// - /// - /// - internal DiagnoseResponseResultValue(IReadOnlyList userDefinedRouteResults, IReadOnlyList networkSecurityRuleResults, IReadOnlyList resourceLockResults, IReadOnlyList dnsResolutionResults, IReadOnlyList storageAccountResults, IReadOnlyList keyVaultResults, IReadOnlyList containerRegistryResults, IReadOnlyList applicationInsightsResults, IReadOnlyList otherResults) - { - UserDefinedRouteResults = userDefinedRouteResults; - NetworkSecurityRuleResults = networkSecurityRuleResults; - ResourceLockResults = resourceLockResults; - DnsResolutionResults = dnsResolutionResults; - StorageAccountResults = storageAccountResults; - KeyVaultResults = keyVaultResults; - ContainerRegistryResults = containerRegistryResults; - ApplicationInsightsResults = applicationInsightsResults; - OtherResults = otherResults; - } - - /// Gets the user defined route results. - public IReadOnlyList UserDefinedRouteResults { get; } - /// Gets the network security rule results. - public IReadOnlyList NetworkSecurityRuleResults { get; } - /// Gets the resource lock results. - public IReadOnlyList ResourceLockResults { get; } - /// Gets the dns resolution results. - public IReadOnlyList DnsResolutionResults { get; } - /// Gets the storage account results. - public IReadOnlyList StorageAccountResults { get; } - /// Gets the key vault results. - public IReadOnlyList KeyVaultResults { get; } - /// Gets the container registry results. - public IReadOnlyList ContainerRegistryResults { get; } - /// Gets the application insights results. - public IReadOnlyList ApplicationInsightsResults { get; } - /// Gets the other results. - public IReadOnlyList OtherResults { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResult.Serialization.cs deleted file mode 100644 index 044ec30d6467..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResult.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DiagnoseResult - { - internal static DiagnoseResult DeserializeDiagnoseResult(JsonElement element) - { - Optional code = default; - Optional level = default; - Optional message = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code")) - { - code = property.Value.GetString(); - continue; - } - if (property.NameEquals("level")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - level = new DiagnoseResultLevel(property.Value.GetString()); - continue; - } - if (property.NameEquals("message")) - { - message = property.Value.GetString(); - continue; - } - } - return new DiagnoseResult(code.Value, Optional.ToNullable(level), message.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResult.cs deleted file mode 100644 index fd8b5b1e2d35..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResult.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Result of Diagnose. - public partial class DiagnoseResult - { - /// Initializes a new instance of DiagnoseResult. - internal DiagnoseResult() - { - } - - /// Initializes a new instance of DiagnoseResult. - /// Code for workspace setup error. - /// Level of workspace setup error. - /// Message of workspace setup error. - internal DiagnoseResult(string code, DiagnoseResultLevel? level, string message) - { - Code = code; - Level = level; - Message = message; - } - - /// Code for workspace setup error. - public string Code { get; } - /// Level of workspace setup error. - public DiagnoseResultLevel? Level { get; } - /// Message of workspace setup error. - public string Message { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResultLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResultLevel.cs deleted file mode 100644 index 52fec31229b6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseResultLevel.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 of workspace setup error. - public readonly partial struct DiagnoseResultLevel : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DiagnoseResultLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string WarningValue = "Warning"; - private const string ErrorValue = "Error"; - private const string InformationValue = "Information"; - - /// Warning. - public static DiagnoseResultLevel Warning { get; } = new DiagnoseResultLevel(WarningValue); - /// Error. - public static DiagnoseResultLevel Error { get; } = new DiagnoseResultLevel(ErrorValue); - /// Information. - public static DiagnoseResultLevel Information { get; } = new DiagnoseResultLevel(InformationValue); - /// Determines if two values are the same. - public static bool operator ==(DiagnoseResultLevel left, DiagnoseResultLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DiagnoseResultLevel left, DiagnoseResultLevel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator DiagnoseResultLevel(string value) => new DiagnoseResultLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DiagnoseResultLevel other && Equals(other); - /// - public bool Equals(DiagnoseResultLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseWorkspaceContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseWorkspaceContent.Serialization.cs deleted file mode 100644 index 65b5beff0b51..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseWorkspaceContent.Serialization.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DiagnoseWorkspaceContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteObjectValue(Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseWorkspaceContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseWorkspaceContent.cs deleted file mode 100644 index 62de834093fa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DiagnoseWorkspaceContent.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Parameters to diagnose a workspace. - public partial class DiagnoseWorkspaceContent - { - /// Initializes a new instance of DiagnoseWorkspaceContent. - public DiagnoseWorkspaceContent() - { - } - - /// Value of Parameters. - public DiagnoseRequestProperties Value { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionConfiguration.Serialization.cs deleted file mode 100644 index 7d0a858176d2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionConfiguration.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class DistributionConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("distributionType"); - writer.WriteStringValue(DistributionType.ToString()); - writer.WriteEndObject(); - } - - internal static DistributionConfiguration DeserializeDistributionConfiguration(JsonElement element) - { - if (element.TryGetProperty("distributionType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Mpi": return Mpi.DeserializeMpi(element); - case "PyTorch": return PyTorch.DeserializePyTorch(element); - case "TensorFlow": return TensorFlow.DeserializeTensorFlow(element); - } - } - return UnknownDistributionConfiguration.DeserializeUnknownDistributionConfiguration(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionConfiguration.cs deleted file mode 100644 index 832e0d26a98c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Base definition for job distribution configuration. - /// Please note is the base class. According to the scenario, a derived class 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 DistributionConfiguration - { - /// Initializes a new instance of DistributionConfiguration. - protected DistributionConfiguration() - { - } - - /// Initializes a new instance of DistributionConfiguration. - /// [Required] Specifies the type of distribution framework. - internal DistributionConfiguration(DistributionType distributionType) - { - DistributionType = distributionType; - } - - /// [Required] Specifies the type of distribution framework. - internal DistributionType DistributionType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs index 68ff218dc4be..c5e61b91224c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/DistributionType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the job distribution type. + /// + /// Enum to determine the job distribution type. + /// Serialized Name: DistributionType + /// internal readonly partial struct DistributionType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public DistributionType(string value) private const string TensorFlowValue = "TensorFlow"; private const string MpiValue = "Mpi"; - /// PyTorch. + /// + /// PyTorch + /// Serialized Name: DistributionType.PyTorch + /// public static DistributionType PyTorch { get; } = new DistributionType(PyTorchValue); - /// TensorFlow. + /// + /// TensorFlow + /// Serialized Name: DistributionType.TensorFlow + /// public static DistributionType TensorFlow { get; } = new DistributionType(TensorFlowValue); - /// Mpi. + /// + /// Mpi + /// Serialized Name: DistributionType.Mpi + /// public static DistributionType Mpi { get; } = new DistributionType(MpiValue); /// Determines if two values are the same. public static bool operator ==(DistributionType left, DistributionType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicy.Serialization.cs deleted file mode 100644 index cd3998e32b1b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicy.Serialization.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EarlyTerminationPolicy : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DelayEvaluation)) - { - writer.WritePropertyName("delayEvaluation"); - writer.WriteNumberValue(DelayEvaluation.Value); - } - if (Optional.IsDefined(EvaluationInterval)) - { - writer.WritePropertyName("evaluationInterval"); - writer.WriteNumberValue(EvaluationInterval.Value); - } - writer.WritePropertyName("policyType"); - writer.WriteStringValue(PolicyType.ToString()); - writer.WriteEndObject(); - } - - internal static EarlyTerminationPolicy DeserializeEarlyTerminationPolicy(JsonElement element) - { - if (element.TryGetProperty("policyType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Bandit": return BanditPolicy.DeserializeBanditPolicy(element); - case "MedianStopping": return MedianStoppingPolicy.DeserializeMedianStoppingPolicy(element); - case "TruncationSelection": return TruncationSelectionPolicy.DeserializeTruncationSelectionPolicy(element); - } - } - return UnknownEarlyTerminationPolicy.DeserializeUnknownEarlyTerminationPolicy(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicy.cs deleted file mode 100644 index 5d293c7619d4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicy.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// 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 abstract partial class EarlyTerminationPolicy - { - /// Initializes a new instance of EarlyTerminationPolicy. - protected EarlyTerminationPolicy() - { - } - - /// Initializes a new instance of EarlyTerminationPolicy. - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. - /// [Required] Name of policy configuration. - internal EarlyTerminationPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType) - { - DelayEvaluation = delayEvaluation; - EvaluationInterval = evaluationInterval; - PolicyType = policyType; - } - - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicyType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicyType.cs index bc1a2f6bf713..eea2a6a964be 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicyType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EarlyTerminationPolicyType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The EarlyTerminationPolicyType. + /// + /// The EarlyTerminationPolicyType. + /// Serialized Name: EarlyTerminationPolicyType + /// internal readonly partial struct EarlyTerminationPolicyType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public EarlyTerminationPolicyType(string value) private const string MedianStoppingValue = "MedianStopping"; private const string TruncationSelectionValue = "TruncationSelection"; - /// Bandit. + /// + /// Bandit + /// Serialized Name: EarlyTerminationPolicyType.Bandit + /// public static EarlyTerminationPolicyType Bandit { get; } = new EarlyTerminationPolicyType(BanditValue); - /// MedianStopping. + /// + /// MedianStopping + /// Serialized Name: EarlyTerminationPolicyType.MedianStopping + /// public static EarlyTerminationPolicyType MedianStopping { get; } = new EarlyTerminationPolicyType(MedianStoppingValue); - /// TruncationSelection. + /// + /// TruncationSelection + /// Serialized Name: EarlyTerminationPolicyType.TruncationSelection + /// public static EarlyTerminationPolicyType TruncationSelection { get; } = new EarlyTerminationPolicyType(TruncationSelectionValue); /// Determines if two values are the same. public static bool operator ==(EarlyTerminationPolicyType left, EarlyTerminationPolicyType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EgressPublicNetworkAccessType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EgressPublicNetworkAccessType.cs deleted file mode 100644 index efe8ace5d69e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EgressPublicNetworkAccessType.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 whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. - public readonly partial struct EgressPublicNetworkAccessType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EgressPublicNetworkAccessType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static EgressPublicNetworkAccessType Enabled { get; } = new EgressPublicNetworkAccessType(EnabledValue); - /// Disabled. - public static EgressPublicNetworkAccessType Disabled { get; } = new EgressPublicNetworkAccessType(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(EgressPublicNetworkAccessType left, EgressPublicNetworkAccessType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EgressPublicNetworkAccessType left, EgressPublicNetworkAccessType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EgressPublicNetworkAccessType(string value) => new EgressPublicNetworkAccessType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EgressPublicNetworkAccessType other && Equals(other); - /// - public bool Equals(EgressPublicNetworkAccessType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultProperties.Serialization.cs deleted file mode 100644 index 61c95a904d56..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultProperties.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EncryptionKeyVaultProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyVaultArmId"); - writer.WriteStringValue(KeyVaultArmId); - writer.WritePropertyName("keyIdentifier"); - writer.WriteStringValue(KeyIdentifier); - if (Optional.IsDefined(IdentityClientId)) - { - writer.WritePropertyName("identityClientId"); - writer.WriteStringValue(IdentityClientId); - } - writer.WriteEndObject(); - } - - internal static EncryptionKeyVaultProperties DeserializeEncryptionKeyVaultProperties(JsonElement element) - { - string keyVaultArmId = default; - string keyIdentifier = default; - Optional identityClientId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("keyVaultArmId")) - { - keyVaultArmId = property.Value.GetString(); - continue; - } - if (property.NameEquals("keyIdentifier")) - { - keyIdentifier = property.Value.GetString(); - continue; - } - if (property.NameEquals("identityClientId")) - { - identityClientId = property.Value.GetString(); - continue; - } - } - return new EncryptionKeyVaultProperties(keyVaultArmId, keyIdentifier, identityClientId.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultProperties.cs deleted file mode 100644 index 889c9181e53f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionKeyVaultProperties.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EncryptionKeyVaultProperties. - public partial class EncryptionKeyVaultProperties - { - /// Initializes a new instance of EncryptionKeyVaultProperties. - /// 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 EncryptionKeyVaultProperties(string keyVaultArmId, string keyIdentifier) - { - Argument.AssertNotNull(keyVaultArmId, nameof(keyVaultArmId)); - Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); - - KeyVaultArmId = keyVaultArmId; - KeyIdentifier = keyIdentifier; - } - - /// Initializes a new instance of EncryptionKeyVaultProperties. - /// 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. - internal EncryptionKeyVaultProperties(string keyVaultArmId, string keyIdentifier, string identityClientId) - { - KeyVaultArmId = keyVaultArmId; - KeyIdentifier = keyIdentifier; - IdentityClientId = identityClientId; - } - - /// The ArmId of the keyVault where the customer owned encryption key is present. - public string 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/EncryptionProperty.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionProperty.Serialization.cs deleted file mode 100644 index d1f29a65a656..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionProperty.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EncryptionProperty : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("status"); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - writer.WritePropertyName("keyVaultProperties"); - writer.WriteObjectValue(KeyVaultProperties); - writer.WriteEndObject(); - } - - internal static EncryptionProperty DeserializeEncryptionProperty(JsonElement element) - { - EncryptionStatus status = default; - Optional identity = default; - EncryptionKeyVaultProperties keyVaultProperties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status")) - { - status = new EncryptionStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - identity = IdentityForCmk.DeserializeIdentityForCmk(property.Value); - continue; - } - if (property.NameEquals("keyVaultProperties")) - { - keyVaultProperties = EncryptionKeyVaultProperties.DeserializeEncryptionKeyVaultProperties(property.Value); - continue; - } - } - return new EncryptionProperty(status, identity.Value, keyVaultProperties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionProperty.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionProperty.cs deleted file mode 100644 index cdf4b2c7a8e5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionProperty.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EncryptionProperty. - public partial class EncryptionProperty - { - /// Initializes a new instance of EncryptionProperty. - /// Indicates whether or not the encryption is enabled for the workspace. - /// Customer Key vault properties. - /// is null. - public EncryptionProperty(EncryptionStatus status, EncryptionKeyVaultProperties keyVaultProperties) - { - Argument.AssertNotNull(keyVaultProperties, nameof(keyVaultProperties)); - - Status = status; - KeyVaultProperties = keyVaultProperties; - } - - /// Initializes a new instance of EncryptionProperty. - /// Indicates whether or not the encryption is enabled for the workspace. - /// The identity that will be used to access the key vault for encryption at rest. - /// Customer Key vault properties. - internal EncryptionProperty(EncryptionStatus status, IdentityForCmk identity, EncryptionKeyVaultProperties keyVaultProperties) - { - Status = status; - Identity = identity; - KeyVaultProperties = keyVaultProperties; - } - - /// Indicates whether or not the encryption is enabled for the workspace. - public EncryptionStatus Status { get; set; } - /// The identity that will be used to access the key vault for encryption at rest. - internal IdentityForCmk Identity { get; set; } - /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. - public string UserAssignedIdentity - { - get => Identity is null ? default : Identity.UserAssignedIdentity; - set - { - if (Identity is null) - Identity = new IdentityForCmk(); - Identity.UserAssignedIdentity = value; - } - } - - /// Customer Key vault properties. - public EncryptionKeyVaultProperties KeyVaultProperties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionStatus.cs deleted file mode 100644 index 943a0bb5dd9a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EncryptionStatus.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 or not the encryption is enabled for the workspace. - public readonly partial struct EncryptionStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EncryptionStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static EncryptionStatus Enabled { get; } = new EncryptionStatus(EnabledValue); - /// Disabled. - public static EncryptionStatus Disabled { get; } = new EncryptionStatus(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(EncryptionStatus left, EncryptionStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EncryptionStatus left, EncryptionStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EncryptionStatus(string value) => new EncryptionStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EncryptionStatus other && Equals(other); - /// - public bool Equals(EncryptionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthKeys.Serialization.cs deleted file mode 100644 index 8b4bd3a424b6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthKeys.Serialization.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointAuthKeys : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PrimaryKey)) - { - if (PrimaryKey != null) - { - writer.WritePropertyName("primaryKey"); - writer.WriteStringValue(PrimaryKey); - } - else - { - writer.WriteNull("primaryKey"); - } - } - if (Optional.IsDefined(SecondaryKey)) - { - if (SecondaryKey != null) - { - writer.WritePropertyName("secondaryKey"); - writer.WriteStringValue(SecondaryKey); - } - else - { - writer.WriteNull("secondaryKey"); - } - } - writer.WriteEndObject(); - } - - internal static EndpointAuthKeys DeserializeEndpointAuthKeys(JsonElement element) - { - Optional primaryKey = default; - Optional secondaryKey = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("primaryKey")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - primaryKey = null; - continue; - } - primaryKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("secondaryKey")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - secondaryKey = null; - continue; - } - secondaryKey = property.Value.GetString(); - continue; - } - } - return new EndpointAuthKeys(primaryKey.Value, secondaryKey.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthKeys.cs deleted file mode 100644 index e151d7e3bc67..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthKeys.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Keys for endpoint authentication. - public partial class EndpointAuthKeys - { - /// Initializes a new instance of EndpointAuthKeys. - public EndpointAuthKeys() - { - } - - /// Initializes a new instance of EndpointAuthKeys. - /// The primary key. - /// The secondary key. - internal EndpointAuthKeys(string primaryKey, string secondaryKey) - { - PrimaryKey = primaryKey; - SecondaryKey = secondaryKey; - } - - /// The primary key. - public string PrimaryKey { get; set; } - /// The secondary key. - public string SecondaryKey { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthMode.cs deleted file mode 100644 index d92d5a15ad88..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthMode.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 -{ - /// Enum to determine endpoint authentication mode. - public readonly partial struct EndpointAuthMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EndpointAuthMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AMLTokenValue = "AMLToken"; - private const string KeyValue = "Key"; - private const string AADTokenValue = "AADToken"; - - /// AMLToken. - public static EndpointAuthMode AMLToken { get; } = new EndpointAuthMode(AMLTokenValue); - /// Key. - public static EndpointAuthMode Key { get; } = new EndpointAuthMode(KeyValue); - /// AADToken. - public static EndpointAuthMode AADToken { get; } = new EndpointAuthMode(AADTokenValue); - /// Determines if two values are the same. - public static bool operator ==(EndpointAuthMode left, EndpointAuthMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EndpointAuthMode left, EndpointAuthMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EndpointAuthMode(string value) => new EndpointAuthMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EndpointAuthMode other && Equals(other); - /// - public bool Equals(EndpointAuthMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthToken.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthToken.Serialization.cs deleted file mode 100644 index 0f529cc667bd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthToken.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointAuthToken - { - internal static EndpointAuthToken DeserializeEndpointAuthToken(JsonElement element) - { - Optional accessToken = default; - Optional expiryTimeUtc = default; - Optional refreshAfterTimeUtc = default; - Optional tokenType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("accessToken")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - accessToken = null; - continue; - } - accessToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("expiryTimeUtc")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - expiryTimeUtc = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("refreshAfterTimeUtc")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - refreshAfterTimeUtc = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("tokenType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tokenType = null; - continue; - } - tokenType = property.Value.GetString(); - continue; - } - } - return new EndpointAuthToken(accessToken.Value, Optional.ToNullable(expiryTimeUtc), Optional.ToNullable(refreshAfterTimeUtc), tokenType.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthToken.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthToken.cs deleted file mode 100644 index c82326371ee0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointAuthToken.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Service Token. - public partial class EndpointAuthToken - { - /// Initializes a new instance of EndpointAuthToken. - internal EndpointAuthToken() - { - } - - /// Initializes a new instance of EndpointAuthToken. - /// Access token for endpoint authentication. - /// Access token expiry time (UTC). - /// Refresh access token after time (UTC). - /// Access token type. - internal EndpointAuthToken(string accessToken, long? expiryTimeUtc, long? refreshAfterTimeUtc, string tokenType) - { - AccessToken = accessToken; - ExpiryTimeUtc = expiryTimeUtc; - RefreshAfterTimeUtc = refreshAfterTimeUtc; - TokenType = tokenType; - } - - /// Access token for endpoint authentication. - public string AccessToken { get; } - /// Access token expiry time (UTC). - public long? ExpiryTimeUtc { get; } - /// Refresh access token after time (UTC). - public long? RefreshAfterTimeUtc { get; } - /// Access token type. - public string TokenType { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointComputeType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointComputeType.cs deleted file mode 100644 index 298507a7fe9d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointComputeType.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 -{ - /// Enum to determine endpoint compute type. - public readonly partial struct EndpointComputeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EndpointComputeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ManagedValue = "Managed"; - private const string KubernetesValue = "Kubernetes"; - private const string AzureMLComputeValue = "AzureMLCompute"; - - /// Managed. - public static EndpointComputeType Managed { get; } = new EndpointComputeType(ManagedValue); - /// Kubernetes. - public static EndpointComputeType Kubernetes { get; } = new EndpointComputeType(KubernetesValue); - /// AzureMLCompute. - public static EndpointComputeType AzureMLCompute { get; } = new EndpointComputeType(AzureMLComputeValue); - /// Determines if two values are the same. - public static bool operator ==(EndpointComputeType left, EndpointComputeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EndpointComputeType left, EndpointComputeType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EndpointComputeType(string value) => new EndpointComputeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EndpointComputeType other && Equals(other); - /// - public bool Equals(EndpointComputeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentPropertiesBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentPropertiesBase.Serialization.cs deleted file mode 100644 index cf51fc201270..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentPropertiesBase.Serialization.cs +++ /dev/null @@ -1,181 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointDeploymentPropertiesBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(CodeConfiguration)) - { - if (CodeConfiguration != null) - { - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - } - else - { - writer.WriteNull("codeConfiguration"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(EnvironmentId)) - { - if (EnvironmentId != null) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - else - { - writer.WriteNull("environmentId"); - } - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - if (EnvironmentVariables != null) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("environmentVariables"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static EndpointDeploymentPropertiesBase DeserializeEndpointDeploymentPropertiesBase(JsonElement element) - { - Optional codeConfiguration = default; - Optional description = default; - Optional environmentId = default; - Optional> environmentVariables = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("codeConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeConfiguration = null; - continue; - } - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentId = null; - continue; - } - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentVariables = 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, property0.Value.GetString()); - } - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - } - return new EndpointDeploymentPropertiesBase(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentPropertiesBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentPropertiesBase.cs deleted file mode 100644 index c7a785b3b413..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointDeploymentPropertiesBase.cs +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Base definition for endpoint deployment. - public partial class EndpointDeploymentPropertiesBase - { - /// Initializes a new instance of EndpointDeploymentPropertiesBase. - public EndpointDeploymentPropertiesBase() - { - EnvironmentVariables = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of EndpointDeploymentPropertiesBase. - /// 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. - internal EndpointDeploymentPropertiesBase(CodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties) - { - CodeConfiguration = codeConfiguration; - Description = description; - EnvironmentId = environmentId; - EnvironmentVariables = environmentVariables; - Properties = properties; - } - - /// Code configuration for the endpoint deployment. - public CodeConfiguration CodeConfiguration { get; set; } - /// Description of the endpoint deployment. - public string Description { 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/EndpointPropertiesBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointPropertiesBase.Serialization.cs deleted file mode 100644 index 5463c857d314..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointPropertiesBase.Serialization.cs +++ /dev/null @@ -1,148 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointPropertiesBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("authMode"); - writer.WriteStringValue(AuthMode.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(Keys)) - { - if (Keys != null) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - else - { - writer.WriteNull("keys"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static EndpointPropertiesBase DeserializeEndpointPropertiesBase(JsonElement element) - { - EndpointAuthMode authMode = default; - Optional description = default; - Optional keys = default; - Optional> properties = default; - Optional scoringUri = default; - Optional swaggerUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authMode")) - { - authMode = new EndpointAuthMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("keys")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - keys = null; - continue; - } - keys = EndpointAuthKeys.DeserializeEndpointAuthKeys(property.Value); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("scoringUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - scoringUri = null; - continue; - } - scoringUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("swaggerUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - swaggerUri = null; - continue; - } - swaggerUri = new Uri(property.Value.GetString()); - continue; - } - } - return new EndpointPropertiesBase(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointPropertiesBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointPropertiesBase.cs deleted file mode 100644 index 3a37df16cad0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointPropertiesBase.cs +++ /dev/null @@ -1,61 +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 -{ - /// Inference Endpoint base definition. - public partial class EndpointPropertiesBase - { - /// Initializes a new instance of EndpointPropertiesBase. - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - public EndpointPropertiesBase(EndpointAuthMode authMode) - { - AuthMode = authMode; - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of EndpointPropertiesBase. - /// [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. - internal EndpointPropertiesBase(EndpointAuthMode authMode, string description, EndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri) - { - AuthMode = authMode; - Description = description; - Keys = keys; - Properties = properties; - ScoringUri = scoringUri; - SwaggerUri = swaggerUri; - } - - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - public EndpointAuthMode 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 EndpointAuthKeys 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointProvisioningState.cs deleted file mode 100644 index 06791323e76c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointProvisioningState.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 -{ - /// State of endpoint provisioning. - public readonly partial struct EndpointProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EndpointProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatingValue = "Creating"; - private const string DeletingValue = "Deleting"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string UpdatingValue = "Updating"; - private const string CanceledValue = "Canceled"; - - /// Creating. - public static EndpointProvisioningState Creating { get; } = new EndpointProvisioningState(CreatingValue); - /// Deleting. - public static EndpointProvisioningState Deleting { get; } = new EndpointProvisioningState(DeletingValue); - /// Succeeded. - public static EndpointProvisioningState Succeeded { get; } = new EndpointProvisioningState(SucceededValue); - /// Failed. - public static EndpointProvisioningState Failed { get; } = new EndpointProvisioningState(FailedValue); - /// Updating. - public static EndpointProvisioningState Updating { get; } = new EndpointProvisioningState(UpdatingValue); - /// Canceled. - public static EndpointProvisioningState Canceled { get; } = new EndpointProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(EndpointProvisioningState left, EndpointProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EndpointProvisioningState left, EndpointProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EndpointProvisioningState(string value) => new EndpointProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EndpointProvisioningState other && Equals(other); - /// - public bool Equals(EndpointProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointScheduleAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointScheduleAction.Serialization.cs deleted file mode 100644 index 4540c57e7da5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointScheduleAction.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EndpointScheduleAction : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("endpointInvocationDefinition"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(EndpointInvocationDefinition); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(EndpointInvocationDefinition.ToString()).RootElement); -#endif - writer.WritePropertyName("actionType"); - writer.WriteStringValue(ActionType.ToString()); - writer.WriteEndObject(); - } - - internal static EndpointScheduleAction DeserializeEndpointScheduleAction(JsonElement element) - { - BinaryData endpointInvocationDefinition = default; - ScheduleActionType actionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("endpointInvocationDefinition")) - { - endpointInvocationDefinition = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("actionType")) - { - actionType = new ScheduleActionType(property.Value.GetString()); - continue; - } - } - return new EndpointScheduleAction(actionType, endpointInvocationDefinition); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointScheduleAction.cs deleted file mode 100644 index 6674308e639d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EndpointScheduleAction.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The EndpointScheduleAction. - public partial class EndpointScheduleAction : ScheduleActionBase - { - /// Initializes a new instance of EndpointScheduleAction. - /// - /// [Required] Defines Schedule action definition details. - /// <see href="TBD" /> - /// - /// is null. - public EndpointScheduleAction(BinaryData endpointInvocationDefinition) - { - Argument.AssertNotNull(endpointInvocationDefinition, nameof(endpointInvocationDefinition)); - - EndpointInvocationDefinition = endpointInvocationDefinition; - ActionType = ScheduleActionType.InvokeBatchEndpoint; - } - - /// Initializes a new instance of EndpointScheduleAction. - /// [Required] Specifies the action type of the schedule. - /// - /// [Required] Defines Schedule action definition details. - /// <see href="TBD" /> - /// - internal EndpointScheduleAction(ScheduleActionType actionType, BinaryData endpointInvocationDefinition) : base(actionType) - { - EndpointInvocationDefinition = endpointInvocationDefinition; - ActionType = actionType; - } - - /// - /// [Required] Defines Schedule action definition details. - /// <see href="TBD" /> - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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 EndpointInvocationDefinition { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerData.Serialization.cs deleted file mode 100644 index 26b694f0bfa5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class EnvironmentContainerData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static EnvironmentContainerData DeserializeEnvironmentContainerData(JsonElement element) - { - EnvironmentContainerProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = EnvironmentContainerProperties.DeserializeEnvironmentContainerProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new EnvironmentContainerData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerProperties.Serialization.cs deleted file mode 100644 index 30071d21cf35..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerProperties.Serialization.cs +++ /dev/null @@ -1,173 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EnvironmentContainerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static EnvironmentContainerProperties DeserializeEnvironmentContainerProperties(JsonElement element) - { - Optional isArchived = default; - Optional latestVersion = default; - Optional nextVersion = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("latestVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - latestVersion = null; - continue; - } - latestVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nextVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nextVersion = null; - continue; - } - nextVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new EnvironmentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerProperties.cs deleted file mode 100644 index fcd209c244e5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerProperties.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Container for environment specification versions. - public partial class EnvironmentContainerProperties : AssetContainer - { - /// Initializes a new instance of EnvironmentContainerProperties. - public EnvironmentContainerProperties() - { - } - - /// Initializes a new instance of EnvironmentContainerProperties. - /// 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. - internal EnvironmentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) - { - } - } -} 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 2b9d25f6b1e1..5b0c3d78589d 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 @@ -17,7 +17,7 @@ internal partial class EnvironmentContainerResourceArmPaginatedResult internal static EnvironmentContainerResourceArmPaginatedResult DeserializeEnvironmentContainerResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static EnvironmentContainerResourceArmPaginatedResult DeserializeEnviro property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EnvironmentContainerData.DeserializeEnvironmentContainerData(item)); + array.Add(MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(item)); } value = array; continue; 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 fad8c11837a1..4b9a496001bc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentContainerResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of EnvironmentContainer entities. + /// + /// A paginated list of EnvironmentContainer entities. + /// Serialized Name: EnvironmentContainerResourceArmPaginatedResult + /// internal partial class EnvironmentContainerResourceArmPaginatedResult { /// Initializes a new instance of EnvironmentContainerResourceArmPaginatedResult. internal EnvironmentContainerResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of EnvironmentContainerResourceArmPaginatedResult. - /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. - /// An array of objects of type EnvironmentContainer. - internal EnvironmentContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. + /// Serialized Name: EnvironmentContainerResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type EnvironmentContainer. + /// Serialized Name: EnvironmentContainerResourceArmPaginatedResult.value + /// + internal EnvironmentContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. + /// + /// The link to the next page of EnvironmentContainer objects. If null, there are no additional pages. + /// Serialized Name: EnvironmentContainerResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type EnvironmentContainer. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type EnvironmentContainer. + /// Serialized Name: EnvironmentContainerResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentType.cs deleted file mode 100644 index 3b7f54451741..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentType.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 -{ - /// Environment type is either user created or curated by Azure ML service. - public readonly partial struct EnvironmentType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public EnvironmentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CuratedValue = "Curated"; - private const string UserCreatedValue = "UserCreated"; - - /// Curated. - public static EnvironmentType Curated { get; } = new EnvironmentType(CuratedValue); - /// UserCreated. - public static EnvironmentType UserCreated { get; } = new EnvironmentType(UserCreatedValue); - /// Determines if two values are the same. - public static bool operator ==(EnvironmentType left, EnvironmentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(EnvironmentType left, EnvironmentType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator EnvironmentType(string value) => new EnvironmentType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is EnvironmentType other && Equals(other); - /// - public bool Equals(EnvironmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionData.Serialization.cs deleted file mode 100644 index 124a30809a05..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class EnvironmentVersionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static EnvironmentVersionData DeserializeEnvironmentVersionData(JsonElement element) - { - EnvironmentVersionProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = EnvironmentVersionProperties.DeserializeEnvironmentVersionProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new EnvironmentVersionData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionProperties.Serialization.cs deleted file mode 100644 index f0b358d09885..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionProperties.Serialization.cs +++ /dev/null @@ -1,264 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EnvironmentVersionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoRebuild)) - { - writer.WritePropertyName("autoRebuild"); - writer.WriteStringValue(AutoRebuild.Value.ToString()); - } - if (Optional.IsDefined(Build)) - { - writer.WritePropertyName("build"); - writer.WriteObjectValue(Build); - } - if (Optional.IsDefined(CondaFile)) - { - writer.WritePropertyName("condaFile"); - writer.WriteStringValue(CondaFile); - } - if (Optional.IsDefined(Image)) - { - writer.WritePropertyName("image"); - writer.WriteStringValue(Image); - } - if (Optional.IsDefined(InferenceConfig)) - { - writer.WritePropertyName("inferenceConfig"); - writer.WriteObjectValue(InferenceConfig); - } - if (Optional.IsDefined(OSType)) - { - writer.WritePropertyName("osType"); - writer.WriteStringValue(OSType.Value.ToString()); - } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static EnvironmentVersionProperties DeserializeEnvironmentVersionProperties(JsonElement element) - { - Optional autoRebuild = default; - Optional build = default; - Optional condaFile = default; - Optional environmentType = default; - Optional image = default; - Optional inferenceConfig = default; - Optional osType = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("autoRebuild")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoRebuild = new AutoRebuildSetting(property.Value.GetString()); - continue; - } - if (property.NameEquals("build")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - build = BuildContext.DeserializeBuildContext(property.Value); - continue; - } - if (property.NameEquals("condaFile")) - { - condaFile = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - environmentType = new EnvironmentType(property.Value.GetString()); - continue; - } - if (property.NameEquals("image")) - { - image = property.Value.GetString(); - continue; - } - if (property.NameEquals("inferenceConfig")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - inferenceConfig = InferenceContainerProperties.DeserializeInferenceContainerProperties(property.Value); - continue; - } - if (property.NameEquals("osType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - osType = new OperatingSystemType(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new EnvironmentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToNullable(autoRebuild), build.Value, condaFile.Value, Optional.ToNullable(environmentType), image.Value, inferenceConfig.Value, Optional.ToNullable(osType)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionProperties.cs deleted file mode 100644 index 3bc7fa2b1c22..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionProperties.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Environment version details. - public partial class EnvironmentVersionProperties : AssetBase - { - /// Initializes a new instance of EnvironmentVersionProperties. - public EnvironmentVersionProperties() - { - } - - /// Initializes a new instance of EnvironmentVersionProperties. - /// 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. - internal EnvironmentVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, AutoRebuildSetting? autoRebuild, BuildContext build, string condaFile, EnvironmentType? environmentType, string image, InferenceContainerProperties inferenceConfig, OperatingSystemType? osType) : base(description, properties, tags, isAnonymous, isArchived) - { - AutoRebuild = autoRebuild; - Build = build; - CondaFile = condaFile; - EnvironmentType = environmentType; - Image = image; - InferenceConfig = inferenceConfig; - OSType = osType; - } - - /// Defines if image needs to be rebuilt based on base image changes. - public AutoRebuildSetting? AutoRebuild { get; set; } - /// Configuration settings for Docker build context. - public BuildContext 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" /> - /// - public EnvironmentType? EnvironmentType { get; } - /// - /// 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" /> - /// - public string Image { get; set; } - /// Defines configuration specific to inference. - public InferenceContainerProperties InferenceConfig { get; set; } - /// The OS type of the environment. - public OperatingSystemType? OSType { get; set; } - } -} 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 477ea4237971..ff1999681427 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 @@ -17,7 +17,7 @@ internal partial class EnvironmentVersionResourceArmPaginatedResult internal static EnvironmentVersionResourceArmPaginatedResult DeserializeEnvironmentVersionResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static EnvironmentVersionResourceArmPaginatedResult DeserializeEnvironm property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(EnvironmentVersionData.DeserializeEnvironmentVersionData(item)); + array.Add(MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(item)); } value = array; continue; 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 da1fc1c05a0c..1a1a70178a06 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EnvironmentVersionResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of EnvironmentVersion entities. + /// + /// A paginated list of EnvironmentVersion entities. + /// Serialized Name: EnvironmentVersionResourceArmPaginatedResult + /// internal partial class EnvironmentVersionResourceArmPaginatedResult { /// Initializes a new instance of EnvironmentVersionResourceArmPaginatedResult. internal EnvironmentVersionResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of EnvironmentVersionResourceArmPaginatedResult. - /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. - /// An array of objects of type EnvironmentVersion. - internal EnvironmentVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. + /// Serialized Name: EnvironmentVersionResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type EnvironmentVersion. + /// Serialized Name: EnvironmentVersionResourceArmPaginatedResult.value + /// + internal EnvironmentVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. + /// + /// The link to the next page of EnvironmentVersion objects. If null, there are no additional pages. + /// Serialized Name: EnvironmentVersionResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type EnvironmentVersion. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type EnvironmentVersion. + /// Serialized Name: EnvironmentVersionResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ErrorResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ErrorResponse.Serialization.cs deleted file mode 100644 index 47d57dd714c3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ErrorResponse.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ErrorResponse - { - internal static ErrorResponse DeserializeErrorResponse(JsonElement element) - { - Optional error = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("error")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - error = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new ErrorResponse(error.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ErrorResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ErrorResponse.cs deleted file mode 100644 index 87a71b55fac2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ErrorResponse.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using Azure; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - public partial class ErrorResponse - { - /// Initializes a new instance of ErrorResponse. - internal ErrorResponse() - { - } - - /// Initializes a new instance of ErrorResponse. - /// The error object. - internal ErrorResponse(ResponseError error) - { - Error = error; - } - - /// The error object. - public ResponseError Error { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrice.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrice.Serialization.cs deleted file mode 100644 index eb5b3b1f85f2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrice.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EstimatedVmPrice - { - internal static EstimatedVmPrice DeserializeEstimatedVmPrice(JsonElement element) - { - double retailPrice = default; - VmPriceOSType osType = default; - VmTier vmTier = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("retailPrice")) - { - retailPrice = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("osType")) - { - osType = new VmPriceOSType(property.Value.GetString()); - continue; - } - if (property.NameEquals("vmTier")) - { - vmTier = new VmTier(property.Value.GetString()); - continue; - } - } - return new EstimatedVmPrice(retailPrice, osType, vmTier); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrice.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrice.cs deleted file mode 100644 index 90ae71689fb9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrice.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The estimated price info for using a VM of a particular OS type, tier, etc. - public partial class EstimatedVmPrice - { - /// Initializes a new instance of EstimatedVmPrice. - /// The price charged for using the VM. - /// Operating system type used by the VM. - /// The type of the VM. - internal EstimatedVmPrice(double retailPrice, VmPriceOSType osType, VmTier vmTier) - { - RetailPrice = retailPrice; - OSType = osType; - VmTier = vmTier; - } - - /// The price charged for using the VM. - public double RetailPrice { get; } - /// Operating system type used by the VM. - public VmPriceOSType OSType { get; } - /// The type of the VM. - public VmTier VmTier { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrices.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrices.Serialization.cs deleted file mode 100644 index e75b212c00f3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrices.Serialization.cs +++ /dev/null @@ -1,47 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class EstimatedVmPrices - { - internal static EstimatedVmPrices DeserializeEstimatedVmPrices(JsonElement element) - { - BillingCurrency billingCurrency = default; - UnitOfMeasure unitOfMeasure = default; - IReadOnlyList values = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("billingCurrency")) - { - billingCurrency = new BillingCurrency(property.Value.GetString()); - continue; - } - if (property.NameEquals("unitOfMeasure")) - { - unitOfMeasure = new UnitOfMeasure(property.Value.GetString()); - continue; - } - if (property.NameEquals("values")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(EstimatedVmPrice.DeserializeEstimatedVmPrice(item)); - } - values = array; - continue; - } - } - return new EstimatedVmPrices(billingCurrency, unitOfMeasure, values); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrices.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrices.cs deleted file mode 100644 index 9dab7c607c72..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/EstimatedVmPrices.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The estimated price info for using a VM. - public partial class EstimatedVmPrices - { - /// Initializes a new instance of EstimatedVmPrices. - /// 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. - /// is null. - internal EstimatedVmPrices(BillingCurrency billingCurrency, UnitOfMeasure unitOfMeasure, IEnumerable values) - { - Argument.AssertNotNull(values, nameof(values)); - - BillingCurrency = billingCurrency; - UnitOfMeasure = unitOfMeasure; - Values = values.ToList(); - } - - /// Initializes a new instance of EstimatedVmPrices. - /// 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. - internal EstimatedVmPrices(BillingCurrency billingCurrency, UnitOfMeasure unitOfMeasure, IReadOnlyList values) - { - BillingCurrency = billingCurrency; - UnitOfMeasure = unitOfMeasure; - Values = values; - } - - /// Three lettered code specifying the currency of the VM price. Example: USD. - public BillingCurrency BillingCurrency { get; } - /// The unit of time measurement for the specified VM price. Example: OneHour. - public UnitOfMeasure UnitOfMeasure { get; } - /// The list of estimated prices for using a VM of a particular OS type, tier, etc. - public IReadOnlyList Values { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.Serialization.cs index 1a314bdd01b6..ce2c86d7f8a4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.Serialization.cs @@ -15,7 +15,7 @@ internal partial class ExternalFqdnResponse { internal static ExternalFqdnResponse DeserializeExternalFqdnResponse(JsonElement element) { - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) @@ -25,10 +25,10 @@ internal static ExternalFqdnResponse DeserializeExternalFqdnResponse(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(FqdnEndpoints.DeserializeFqdnEndpoints(item)); + array.Add(MachineLearningFqdnEndpoints.DeserializeMachineLearningFqdnEndpoints(item)); } value = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.cs index 99c7c3c1badd..8b1fcf16edee 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ExternalFqdnResponse.cs @@ -10,23 +10,26 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ExternalFqdnResponse. + /// + /// The ExternalFqdnResponse. + /// Serialized Name: ExternalFqdnResponse + /// internal partial class ExternalFqdnResponse { /// Initializes a new instance of ExternalFqdnResponse. internal ExternalFqdnResponse() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ExternalFqdnResponse. - /// - internal ExternalFqdnResponse(IReadOnlyList value) + /// Serialized Name: ExternalFqdnResponse.value. + internal ExternalFqdnResponse(IReadOnlyList value) { Value = value; } - /// Gets the value. - public IReadOnlyList Value { get; } + /// Serialized Name: ExternalFqdnResponse.value. + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureLag.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureLag.cs deleted file mode 100644 index d684cce7d201..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeatureLag.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 -{ - /// Flag for generating lags for the numeric features. - public readonly partial struct FeatureLag : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FeatureLag(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string AutoValue = "Auto"; - - /// No feature lags generated. - public static FeatureLag None { get; } = new FeatureLag(NoneValue); - /// System auto-generates feature lags. - public static FeatureLag Auto { get; } = new FeatureLag(AutoValue); - /// Determines if two values are the same. - public static bool operator ==(FeatureLag left, FeatureLag right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FeatureLag left, FeatureLag right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FeatureLag(string value) => new FeatureLag(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FeatureLag other && Equals(other); - /// - public bool Equals(FeatureLag other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationMode.cs deleted file mode 100644 index 27e9ce60979a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationMode.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 -{ - /// Featurization mode - determines data featurization mode. - public readonly partial struct FeaturizationMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FeaturizationMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutoValue = "Auto"; - private const string CustomValue = "Custom"; - private const string OffValue = "Off"; - - /// Auto mode, system performs featurization without any custom featurization inputs. - public static FeaturizationMode Auto { get; } = new FeaturizationMode(AutoValue); - /// Custom featurization. - public static FeaturizationMode Custom { get; } = new FeaturizationMode(CustomValue); - /// Featurization off. 'Forecasting' task cannot use this value. - public static FeaturizationMode Off { get; } = new FeaturizationMode(OffValue); - /// Determines if two values are the same. - public static bool operator ==(FeaturizationMode left, FeaturizationMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FeaturizationMode left, FeaturizationMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator FeaturizationMode(string value) => new FeaturizationMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FeaturizationMode other && Equals(other); - /// - public bool Equals(FeaturizationMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationSettings.Serialization.cs deleted file mode 100644 index 13d433c40ec0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationSettings.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FeaturizationSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DatasetLanguage)) - { - if (DatasetLanguage != null) - { - writer.WritePropertyName("datasetLanguage"); - writer.WriteStringValue(DatasetLanguage); - } - else - { - writer.WriteNull("datasetLanguage"); - } - } - writer.WriteEndObject(); - } - - internal static FeaturizationSettings DeserializeFeaturizationSettings(JsonElement element) - { - Optional datasetLanguage = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("datasetLanguage")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - datasetLanguage = null; - continue; - } - datasetLanguage = property.Value.GetString(); - continue; - } - } - return new FeaturizationSettings(datasetLanguage.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationSettings.cs deleted file mode 100644 index 8d41722b58a0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FeaturizationSettings.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Featurization Configuration. - public partial class FeaturizationSettings - { - /// Initializes a new instance of FeaturizationSettings. - public FeaturizationSettings() - { - } - - /// Initializes a new instance of FeaturizationSettings. - /// Dataset language, useful for the text data. - internal FeaturizationSettings(string datasetLanguage) - { - DatasetLanguage = datasetLanguage; - } - - /// Dataset language, useful for the text data. - public string DatasetLanguage { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FlavorData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FlavorData.Serialization.cs deleted file mode 100644 index 382aac24a607..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FlavorData.Serialization.cs +++ /dev/null @@ -1,71 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FlavorData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Data)) - { - if (Data != null) - { - writer.WritePropertyName("data"); - writer.WriteStartObject(); - foreach (var item in Data) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("data"); - } - } - writer.WriteEndObject(); - } - - internal static FlavorData DeserializeFlavorData(JsonElement element) - { - Optional> data = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("data")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - data = 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, property0.Value.GetString()); - } - } - data = dictionary; - continue; - } - } - return new FlavorData(Optional.ToDictionary(data)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FlavorData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FlavorData.cs deleted file mode 100644 index 4174959306ce..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FlavorData.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The FlavorData. - public partial class FlavorData - { - /// Initializes a new instance of FlavorData. - public FlavorData() - { - Data = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of FlavorData. - /// Model flavor-specific data. - internal FlavorData(IDictionary data) - { - Data = data; - } - - /// Model flavor-specific data. - public IDictionary Data { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizon.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizon.cs index 0acf76dd4e4b..6dd18f980413 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizon.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizon.cs @@ -9,6 +9,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// /// The desired maximum forecast horizon in units of time-series frequency. + /// Serialized Name: ForecastHorizon /// Please note is the base class. According to the scenario, a derived class 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 . /// @@ -20,13 +21,19 @@ protected ForecastHorizon() } /// Initializes a new instance of ForecastHorizon. - /// [Required] Set forecast horizon value selection mode. + /// + /// [Required] Set forecast horizon value selection mode. + /// Serialized Name: ForecastHorizon.mode + /// internal ForecastHorizon(ForecastHorizonMode mode) { Mode = mode; } - /// [Required] Set forecast horizon value selection mode. + /// + /// [Required] Set forecast horizon value selection mode. + /// Serialized Name: ForecastHorizon.mode + /// internal ForecastHorizonMode Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizonMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizonMode.cs index b9ea4fd43b4a..03120b5bf4ad 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizonMode.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastHorizonMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine forecast horizon selection mode. + /// + /// Enum to determine forecast horizon selection mode. + /// Serialized Name: ForecastHorizonMode + /// internal readonly partial struct ForecastHorizonMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public ForecastHorizonMode(string value) private const string AutoValue = "Auto"; private const string CustomValue = "Custom"; - /// Forecast horizon to be determined automatically. + /// + /// Forecast horizon to be determined automatically. + /// Serialized Name: ForecastHorizonMode.Auto + /// public static ForecastHorizonMode Auto { get; } = new ForecastHorizonMode(AutoValue); - /// Use the custom forecast horizon. + /// + /// Use the custom forecast horizon. + /// Serialized Name: ForecastHorizonMode.Custom + /// public static ForecastHorizonMode Custom { get; } = new ForecastHorizonMode(CustomValue); /// Determines if two values are the same. public static bool operator ==(ForecastHorizonMode left, ForecastHorizonMode right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.Serialization.cs index b98f83233fe9..87d65b1a4bb0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.Serialization.cs @@ -191,15 +191,15 @@ internal static Forecasting DeserializeForecasting(JsonElement element) Optional featurizationSettings = default; Optional limitSettings = default; Optional nCrossValidations = default; - Optional testData = default; + Optional testData = default; Optional testDataSize = default; - Optional validationData = default; + Optional validationData = default; Optional validationDataSize = default; Optional weightColumnName = default; - Optional logVerbosity = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("forecastingSettings")) @@ -284,7 +284,7 @@ internal static Forecasting DeserializeForecasting(JsonElement element) testData = null; continue; } - testData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + testData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("testDataSize")) @@ -304,7 +304,7 @@ internal static Forecasting DeserializeForecasting(JsonElement element) validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("validationDataSize")) @@ -334,7 +334,7 @@ internal static Forecasting DeserializeForecasting(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -354,7 +354,7 @@ internal static Forecasting DeserializeForecasting(JsonElement element) } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.cs index 3c0eb3dc3653..bd380bc5e7e8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Forecasting.cs @@ -11,13 +11,19 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Forecasting task in AutoML Table vertical. + /// + /// Forecasting task in AutoML Table vertical. + /// Serialized Name: Forecasting + /// public partial class Forecasting : AutoMLVertical { /// Initializes a new instance of Forecasting. - /// [Required] Training data input. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// /// is null. - public Forecasting(MLTableJobInput trainingData) : base(trainingData) + public Forecasting(MachineLearningTableJobInput trainingData) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); @@ -26,39 +32,79 @@ public Forecasting(MLTableJobInput trainingData) : base(trainingData) } /// Initializes a new instance of Forecasting. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Forecasting task specific inputs. + /// Serialized Name: Forecasting.forecastingSettings + /// + /// + /// Primary metric for forecasting task. + /// Serialized Name: Forecasting.primaryMetric + /// + /// + /// Inputs for training phase for an AutoML Job. + /// Serialized Name: Forecasting.trainingSettings + /// + /// + /// Columns to use for CVSplit data. + /// Serialized Name: TableVertical.cvSplitColumnNames + /// + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: TableVertical.featurizationSettings + /// + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: TableVertical.limitSettings /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - /// Forecasting task specific inputs. - /// Primary metric for forecasting 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 /// when validation dataset is not provided. + /// Serialized Name: TableVertical.nCrossValidations /// Please note is the base class. According to the scenario, a derived class 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 . /// - /// Test data input. + /// + /// Test data input. + /// Serialized Name: TableVertical.testData + /// /// /// 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. + /// Serialized Name: TableVertical.testDataSize + /// + /// + /// Validation data inputs. + /// Serialized Name: TableVertical.validationData /// - /// Validation data inputs. /// /// 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. + /// Serialized Name: TableVertical.validationDataSize /// - /// 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 Forecasting(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ForecastingSettings forecastingSettings, ForecastingPrimaryMetric? primaryMetric, ForecastingTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MLTableJobInput testData, double? testDataSize, MLTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) + /// + /// 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. + /// Serialized Name: TableVertical.weightColumnName + /// + internal Forecasting(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, 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) { ForecastingSettings = forecastingSettings; PrimaryMetric = primaryMetric; @@ -75,42 +121,72 @@ internal Forecasting(LogVerbosity? logVerbosity, string targetColumnName, TaskTy TaskType = taskType; } - /// Forecasting task specific inputs. + /// + /// Forecasting task specific inputs. + /// Serialized Name: Forecasting.forecastingSettings + /// public ForecastingSettings ForecastingSettings { get; set; } - /// Primary metric for forecasting task. + /// + /// Primary metric for forecasting task. + /// Serialized Name: Forecasting.primaryMetric + /// public ForecastingPrimaryMetric? PrimaryMetric { get; set; } - /// Inputs for training phase for an AutoML Job. + /// + /// Inputs for training phase for an AutoML Job. + /// Serialized Name: Forecasting.trainingSettings + /// public ForecastingTrainingSettings TrainingSettings { get; set; } - /// Columns to use for CVSplit data. + /// + /// Columns to use for CVSplit data. + /// Serialized Name: TableVertical.cvSplitColumnNames + /// public IList CvSplitColumnNames { get; set; } - /// Featurization inputs needed for AutoML job. + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: TableVertical.featurizationSettings + /// public TableVerticalFeaturizationSettings FeaturizationSettings { get; set; } - /// Execution constraints for AutoMLJob. + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: TableVertical.limitSettings + /// public TableVerticalLimitSettings LimitSettings { get; set; } /// /// Number of cross validation folds to be applied on training dataset /// when validation dataset is not provided. + /// Serialized Name: TableVertical.nCrossValidations /// Please note is the base class. According to the scenario, a derived class 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 NCrossValidations NCrossValidations { get; set; } - /// Test data input. - public MLTableJobInput TestData { get; set; } + /// + /// Test data input. + /// Serialized Name: TableVertical.testData + /// + public MachineLearningTableJobInput TestData { get; set; } /// /// 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. + /// Serialized Name: TableVertical.testDataSize /// public double? TestDataSize { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: TableVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } /// /// 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. + /// Serialized Name: TableVertical.validationDataSize /// 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. + /// + /// 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. + /// Serialized Name: TableVertical.weightColumnName + /// public string WeightColumnName { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs index 87322c460cda..02e6287aa4d7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingModel.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum for all forecasting models supported by AutoML. + /// + /// Enum for all forecasting models supported by AutoML. + /// Serialized Name: ForecastingModels + /// public readonly partial struct ForecastingModel : IEquatable { private readonly string _value; @@ -45,63 +48,106 @@ public ForecastingModel(string value) /// /// Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. /// This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. + /// Serialized Name: ForecastingModels.AutoArima /// public static ForecastingModel AutoArima { get; } = new ForecastingModel(AutoArimaValue); /// /// Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. /// It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. + /// Serialized Name: ForecastingModels.Prophet /// public static ForecastingModel Prophet { get; } = new ForecastingModel(ProphetValue); - /// The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data. + /// + /// The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data. + /// Serialized Name: ForecastingModels.Naive + /// public static ForecastingModel Naive { get; } = new ForecastingModel(NaiveValue); - /// The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data. + /// + /// The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data. + /// Serialized Name: ForecastingModels.SeasonalNaive + /// public static ForecastingModel SeasonalNaive { get; } = new ForecastingModel(SeasonalNaiveValue); - /// The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data. + /// + /// The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data. + /// Serialized Name: ForecastingModels.Average + /// public static ForecastingModel Average { get; } = new ForecastingModel(AverageValue); - /// The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data. + /// + /// The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data. + /// Serialized Name: ForecastingModels.SeasonalAverage + /// public static ForecastingModel SeasonalAverage { get; } = new ForecastingModel(SeasonalAverageValue); - /// Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component. + /// + /// Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component. + /// Serialized Name: ForecastingModels.ExponentialSmoothing + /// public static ForecastingModel ExponentialSmoothing { get; } = new ForecastingModel(ExponentialSmoothingValue); /// /// An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. /// This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. + /// Serialized Name: ForecastingModels.Arimax /// public static ForecastingModel Arimax { get; } = new ForecastingModel(ArimaxValue); - /// TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro. + /// + /// TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro. + /// Serialized Name: ForecastingModels.TCNForecaster + /// public static ForecastingModel TCNForecaster { get; } = new ForecastingModel(TCNForecasterValue); - /// Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. + /// + /// Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. + /// Serialized Name: ForecastingModels.ElasticNet + /// public static ForecastingModel ElasticNet { get; } = new ForecastingModel(ElasticNetValue); - /// The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + /// + /// The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. + /// Serialized Name: ForecastingModels.GradientBoosting + /// public static ForecastingModel GradientBoosting { get; } = new ForecastingModel(GradientBoostingValue); /// /// Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. /// The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. + /// Serialized Name: ForecastingModels.DecisionTree /// public static ForecastingModel DecisionTree { get; } = new ForecastingModel(DecisionTreeValue); /// /// K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints /// which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. + /// Serialized Name: ForecastingModels.KNN /// public static ForecastingModel KNN { get; } = new ForecastingModel(KNNValue); - /// Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. + /// + /// Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. + /// Serialized Name: ForecastingModels.LassoLars + /// public static ForecastingModel LassoLars { get; } = new ForecastingModel(LassoLarsValue); /// /// SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications /// to find the model parameters that correspond to the best fit between predicted and actual outputs. /// It's an inexact but powerful technique. + /// Serialized Name: ForecastingModels.SGD /// public static ForecastingModel SGD { get; } = new ForecastingModel(SGDValue); /// /// Random forest is a supervised learning algorithm. /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. /// The general idea of the bagging method is that a combination of learning models increases the overall result. + /// Serialized Name: ForecastingModels.RandomForest /// public static ForecastingModel RandomForest { get; } = new ForecastingModel(RandomForestValue); - /// Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + /// + /// Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. + /// Serialized Name: ForecastingModels.ExtremeRandomTrees + /// public static ForecastingModel ExtremeRandomTrees { get; } = new ForecastingModel(ExtremeRandomTreesValue); - /// LightGBM is a gradient boosting framework that uses tree based learning algorithms. + /// + /// LightGBM is a gradient boosting framework that uses tree based learning algorithms. + /// Serialized Name: ForecastingModels.LightGBM + /// public static ForecastingModel LightGBM { get; } = new ForecastingModel(LightGBMValue); - /// XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. + /// + /// XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. + /// Serialized Name: ForecastingModels.XGBoostRegressor + /// public static ForecastingModel XGBoostRegressor { get; } = new ForecastingModel(XGBoostRegressorValue); /// Determines if two values are the same. public static bool operator ==(ForecastingModel left, ForecastingModel right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingPrimaryMetric.cs index 3aa31f8bf516..16cd61f5ad38 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingPrimaryMetric.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingPrimaryMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Primary metrics for Forecasting task. + /// + /// Primary metrics for Forecasting task. + /// Serialized Name: ForecastingPrimaryMetrics + /// public readonly partial struct ForecastingPrimaryMetric : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public ForecastingPrimaryMetric(string value) private const string R2ScoreValue = "R2Score"; private const string NormalizedMeanAbsoluteErrorValue = "NormalizedMeanAbsoluteError"; - /// The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation. + /// + /// The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation. + /// Serialized Name: ForecastingPrimaryMetrics.SpearmanCorrelation + /// public static ForecastingPrimaryMetric SpearmanCorrelation { get; } = new ForecastingPrimaryMetric(SpearmanCorrelationValue); - /// The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. + /// + /// The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. + /// Serialized Name: ForecastingPrimaryMetrics.NormalizedRootMeanSquaredError + /// public static ForecastingPrimaryMetric NormalizedRootMeanSquaredError { get; } = new ForecastingPrimaryMetric(NormalizedRootMeanSquaredErrorValue); - /// The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. + /// + /// The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. + /// Serialized Name: ForecastingPrimaryMetrics.R2Score + /// public static ForecastingPrimaryMetric R2Score { get; } = new ForecastingPrimaryMetric(R2ScoreValue); - /// The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. + /// + /// The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. + /// Serialized Name: ForecastingPrimaryMetrics.NormalizedMeanAbsoluteError + /// public static ForecastingPrimaryMetric NormalizedMeanAbsoluteError { get; } = new ForecastingPrimaryMetric(NormalizedMeanAbsoluteErrorValue); /// Determines if two values are the same. public static bool operator ==(ForecastingPrimaryMetric left, ForecastingPrimaryMetric right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSeasonality.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSeasonality.Serialization.cs new file mode 100644 index 000000000000..309ddb5a8ff5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSeasonality.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class ForecastingSeasonality : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.ToString()); + writer.WriteEndObject(); + } + + internal static ForecastingSeasonality DeserializeForecastingSeasonality(JsonElement element) + { + if (element.TryGetProperty("mode", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Auto": return AutoSeasonality.DeserializeAutoSeasonality(element); + case "Custom": return CustomSeasonality.DeserializeCustomSeasonality(element); + } + } + return UnknownSeasonality.DeserializeUnknownSeasonality(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSeasonality.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSeasonality.cs new file mode 100644 index 000000000000..1e2dded28174 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSeasonality.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Forecasting seasonality. + /// Serialized Name: Seasonality + /// Please note is the base class. According to the scenario, a derived class 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 ForecastingSeasonality + { + /// Initializes a new instance of ForecastingSeasonality. + protected ForecastingSeasonality() + { + } + + /// Initializes a new instance of ForecastingSeasonality. + /// + /// [Required] Seasonality mode. + /// Serialized Name: Seasonality.mode + /// + internal ForecastingSeasonality(SeasonalityMode mode) + { + Mode = mode; + } + + /// + /// [Required] Seasonality mode. + /// Serialized Name: Seasonality.mode + /// + internal SeasonalityMode Mode { get; set; } + } +} 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 9aefce2ee170..32f45fbd2ce8 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 @@ -142,17 +142,17 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e { Optional countryOrRegionForHolidays = default; Optional cvStepSize = default; - Optional featureLags = default; + Optional featureLags = default; Optional forecastHorizon = default; Optional frequency = default; - Optional seasonality = default; - Optional shortSeriesHandlingConfig = default; + Optional seasonality = default; + Optional shortSeriesHandlingConfig = default; Optional targetAggregateFunction = default; Optional targetLags = default; Optional targetRollingWindowSize = default; Optional timeColumnName = default; Optional> timeSeriesIdColumnNames = default; - Optional useStl = default; + Optional useStl = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("countryOrRegionForHolidays")) @@ -182,7 +182,7 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - featureLags = new FeatureLag(property.Value.GetString()); + featureLags = new MachineLearningFeatureLag(property.Value.GetString()); continue; } if (property.NameEquals("forecastHorizon")) @@ -212,7 +212,7 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - seasonality = Seasonality.DeserializeSeasonality(property.Value); + seasonality = ForecastingSeasonality.DeserializeForecastingSeasonality(property.Value); continue; } if (property.NameEquals("shortSeriesHandlingConfig")) @@ -222,7 +222,7 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - shortSeriesHandlingConfig = new ShortSeriesHandlingConfiguration(property.Value.GetString()); + shortSeriesHandlingConfig = new MachineLearningShortSeriesHandlingConfiguration(property.Value.GetString()); continue; } if (property.NameEquals("targetAggregateFunction")) @@ -287,7 +287,7 @@ internal static ForecastingSettings DeserializeForecastingSettings(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - useStl = new UseStl(property.Value.GetString()); + useStl = new MachineLearningUseStl(property.Value.GetString()); continue; } } 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 5513c1b1f839..8799daebdb82 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingSettings.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Forecasting specific parameters. + /// + /// Forecasting specific parameters. + /// Serialized Name: ForecastingSettings + /// public partial class ForecastingSettings { /// Initializes a new instance of ForecastingSettings. @@ -23,47 +26,70 @@ 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'. + /// Serialized Name: ForecastingSettings.countryOrRegionForHolidays /// /// /// 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. + /// Serialized Name: ForecastingSettings.cvStepSize + /// + /// + /// Flag for generating lags for the numeric features with 'auto' or null. + /// Serialized Name: ForecastingSettings.featureLags /// - /// Flag for generating lags for the numeric features with 'auto' or null. /// /// The desired maximum forecast horizon in units of time-series frequency. + /// Serialized Name: ForecastingSettings.forecastHorizon /// Please note is the base class. According to the scenario, a derived class 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 . /// - /// 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. + /// + /// 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. + /// Serialized Name: ForecastingSettings.frequency + /// /// /// Set time series seasonality as an integer multiple of the series frequency. /// If seasonality is set to 'auto', it will be inferred. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Serialized Name: ForecastingSettings.seasonality + /// Please note is the base class. According to the scenario, a derived class 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 parameter defining how if AutoML should handle short time series. + /// + /// The parameter defining how if AutoML should handle short time series. + /// Serialized Name: ForecastingSettings.shortSeriesHandlingConfig + /// /// /// 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". + /// Serialized Name: ForecastingSettings.targetAggregateFunction /// /// /// The number of past periods to lag from the target column. + /// Serialized Name: ForecastingSettings.targetLags /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: ForecastingSettings.targetRollingWindowSize /// Please note is the base class. According to the scenario, a derived class 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 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. + /// Serialized Name: ForecastingSettings.timeColumnName + /// /// /// 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. + /// Serialized Name: ForecastingSettings.timeSeriesIdColumnNames /// - /// Configure STL Decomposition of the time-series target column. - internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, FeatureLag? featureLags, ForecastHorizon forecastHorizon, string frequency, Seasonality seasonality, ShortSeriesHandlingConfiguration? shortSeriesHandlingConfig, TargetAggregationFunction? targetAggregateFunction, TargetLags targetLags, TargetRollingWindowSize targetRollingWindowSize, string timeColumnName, IList timeSeriesIdColumnNames, UseStl? useStl) + /// + /// Configure STL Decomposition of the time-series target column. + /// Serialized Name: ForecastingSettings.useStl + /// + 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) { CountryOrRegionForHolidays = countryOrRegionForHolidays; CvStepSize = cvStepSize; @@ -83,58 +109,81 @@ internal ForecastingSettings(string countryOrRegionForHolidays, int? cvStepSize, /// /// Country or region for holidays for forecasting tasks. /// These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. + /// Serialized Name: ForecastingSettings.countryOrRegionForHolidays /// public string CountryOrRegionForHolidays { 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. + /// Serialized Name: ForecastingSettings.cvStepSize /// public int? CvStepSize { get; set; } - /// Flag for generating lags for the numeric features with 'auto' or null. - public FeatureLag? FeatureLags { get; set; } + /// + /// Flag for generating lags for the numeric features with 'auto' or null. + /// Serialized Name: ForecastingSettings.featureLags + /// + public MachineLearningFeatureLag? FeatureLags { get; set; } /// /// The desired maximum forecast horizon in units of time-series frequency. + /// Serialized Name: ForecastingSettings.forecastHorizon /// Please note is the base class. According to the scenario, a derived class 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; } - /// 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. + /// + /// 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. + /// Serialized Name: ForecastingSettings.frequency + /// public string Frequency { get; set; } /// /// Set time series seasonality as an integer multiple of the series frequency. /// If seasonality is set to 'auto', it will be inferred. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// Serialized Name: ForecastingSettings.seasonality + /// Please note is the base class. According to the scenario, a derived class 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 Seasonality Seasonality { get; set; } - /// The parameter defining how if AutoML should handle short time series. - public ShortSeriesHandlingConfiguration? ShortSeriesHandlingConfig { get; set; } + public ForecastingSeasonality Seasonality { get; set; } + /// + /// The parameter defining how if AutoML should handle short time series. + /// Serialized Name: ForecastingSettings.shortSeriesHandlingConfig + /// + public MachineLearningShortSeriesHandlingConfiguration? ShortSeriesHandlingConfig { 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". + /// Serialized Name: ForecastingSettings.targetAggregateFunction /// public TargetAggregationFunction? TargetAggregateFunction { get; set; } /// /// The number of past periods to lag from the target column. + /// Serialized Name: ForecastingSettings.targetLags /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: ForecastingSettings.targetRollingWindowSize /// Please note is the base class. According to the scenario, a derived class 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. + /// + /// 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. + /// Serialized Name: ForecastingSettings.timeColumnName + /// 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. + /// Serialized Name: ForecastingSettings.timeSeriesIdColumnNames /// public IList TimeSeriesIdColumnNames { get; set; } - /// Configure STL Decomposition of the time-series target column. - public UseStl? UseStl { get; set; } + /// + /// Configure STL Decomposition of the time-series target column. + /// Serialized Name: ForecastingSettings.useStl + /// + public MachineLearningUseStl? UseStl { 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 5c39b4fdea41..d8a5daede884 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 @@ -51,30 +51,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("blockedTrainingAlgorithms"); } } - if (Optional.IsDefined(EnableDnnTraining)) + if (Optional.IsDefined(IsDnnTrainingEnabled)) { writer.WritePropertyName("enableDnnTraining"); - writer.WriteBooleanValue(EnableDnnTraining.Value); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } - if (Optional.IsDefined(EnableModelExplainability)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { writer.WritePropertyName("enableModelExplainability"); - writer.WriteBooleanValue(EnableModelExplainability.Value); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); } - if (Optional.IsDefined(EnableOnnxCompatibleModels)) + if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"); - writer.WriteBooleanValue(EnableOnnxCompatibleModels.Value); + writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } - if (Optional.IsDefined(EnableStackEnsemble)) + if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"); - writer.WriteBooleanValue(EnableStackEnsemble.Value); + writer.WriteBooleanValue(IsStackEnsembleEnabled.Value); } - if (Optional.IsDefined(EnableVoteEnsemble)) + if (Optional.IsDefined(IsVoteEnsembleEnabled)) { writer.WritePropertyName("enableVoteEnsemble"); - writer.WriteBooleanValue(EnableVoteEnsemble.Value); + writer.WriteBooleanValue(IsVoteEnsembleEnabled.Value); } if (Optional.IsDefined(EnsembleModelDownloadTimeout)) { @@ -106,7 +106,7 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin Optional enableStackEnsemble = default; Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; - Optional stackEnsembleSettings = default; + Optional stackEnsembleSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("allowedTrainingAlgorithms")) @@ -206,7 +206,7 @@ internal static ForecastingTrainingSettings DeserializeForecastingTrainingSettin stackEnsembleSettings = null; continue; } - stackEnsembleSettings = StackEnsembleSettings.DeserializeStackEnsembleSettings(property.Value); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } } 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 44ded9d9b74b..10dd60265da6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ForecastingTrainingSettings.cs @@ -11,8 +11,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Forecasting Training related configuration. - public partial class ForecastingTrainingSettings : TrainingSettings + /// + /// Forecasting Training related configuration. + /// Serialized Name: ForecastingTrainingSettings + /// + public partial class ForecastingTrainingSettings : MachineLearningTrainingSettings { /// Initializes a new instance of ForecastingTrainingSettings. public ForecastingTrainingSettings() @@ -22,27 +25,58 @@ public ForecastingTrainingSettings() } /// Initializes a new instance of ForecastingTrainingSettings. - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. - /// Flag for enabling onnx compatible models. - /// Enable stack ensemble run. - /// Enable voting ensemble run. + /// + /// Enable recommendation of DNN models. + /// Serialized Name: TrainingSettings.enableDnnTraining + /// + /// + /// Flag to turn on explainability on best model. + /// Serialized Name: TrainingSettings.enableModelExplainability + /// + /// + /// Flag for enabling onnx compatible models. + /// Serialized Name: TrainingSettings.enableOnnxCompatibleModels + /// + /// + /// Enable stack ensemble run. + /// Serialized Name: TrainingSettings.enableStackEnsemble + /// + /// + /// Enable voting ensemble run. + /// Serialized Name: TrainingSettings.enableVoteEnsemble + /// /// /// 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. + /// Serialized Name: TrainingSettings.ensembleModelDownloadTimeout + /// + /// + /// Stack ensemble settings for stack ensemble run. + /// Serialized Name: TrainingSettings.stackEnsembleSettings + /// + /// + /// Allowed models for forecasting task. + /// Serialized Name: ForecastingTrainingSettings.allowedTrainingAlgorithms + /// + /// + /// Blocked models for forecasting task. + /// Serialized Name: ForecastingTrainingSettings.blockedTrainingAlgorithms /// - /// Stack ensemble settings for stack ensemble run. - /// Allowed models for forecasting task. - /// Blocked models for forecasting task. - internal ForecastingTrainingSettings(bool? enableDnnTraining, bool? enableModelExplainability, bool? enableOnnxCompatibleModels, bool? enableStackEnsemble, bool? enableVoteEnsemble, TimeSpan? ensembleModelDownloadTimeout, StackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(enableDnnTraining, enableModelExplainability, enableOnnxCompatibleModels, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, stackEnsembleSettings) + internal ForecastingTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; } - /// Allowed models for forecasting task. + /// + /// Allowed models for forecasting task. + /// Serialized Name: ForecastingTrainingSettings.allowedTrainingAlgorithms + /// public IList AllowedTrainingAlgorithms { get; set; } - /// Blocked models for forecasting task. + /// + /// Blocked models for forecasting task. + /// Serialized Name: ForecastingTrainingSettings.blockedTrainingAlgorithms + /// public IList BlockedTrainingAlgorithms { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoint.Serialization.cs deleted file mode 100644 index 6974dc0a11a5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoint.Serialization.cs +++ /dev/null @@ -1,46 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FqdnEndpoint - { - internal static FqdnEndpoint DeserializeFqdnEndpoint(JsonElement element) - { - Optional domainName = default; - Optional> endpointDetails = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("domainName")) - { - domainName = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpointDetails")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(FqdnEndpointDetail.DeserializeFqdnEndpointDetail(item)); - } - endpointDetails = array; - continue; - } - } - return new FqdnEndpoint(domainName.Value, Optional.ToList(endpointDetails)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoint.cs deleted file mode 100644 index 9c70bf20ce63..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoint.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The FqdnEndpoint. - public partial class FqdnEndpoint - { - /// Initializes a new instance of FqdnEndpoint. - internal FqdnEndpoint() - { - EndpointDetails = new ChangeTrackingList(); - } - - /// Initializes a new instance of FqdnEndpoint. - /// - /// - internal FqdnEndpoint(string domainName, IReadOnlyList endpointDetails) - { - DomainName = domainName; - EndpointDetails = endpointDetails; - } - - /// Gets the domain name. - public string DomainName { get; } - /// Gets the endpoint details. - public IReadOnlyList EndpointDetails { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointDetail.Serialization.cs deleted file mode 100644 index bf5bf2801ca0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointDetail.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FqdnEndpointDetail - { - internal static FqdnEndpointDetail DeserializeFqdnEndpointDetail(JsonElement element) - { - Optional port = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("port")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - port = property.Value.GetInt32(); - continue; - } - } - return new FqdnEndpointDetail(Optional.ToNullable(port)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointDetail.cs deleted file mode 100644 index e87f113e01a8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointDetail.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The FqdnEndpointDetail. - public partial class FqdnEndpointDetail - { - /// Initializes a new instance of FqdnEndpointDetail. - internal FqdnEndpointDetail() - { - } - - /// Initializes a new instance of FqdnEndpointDetail. - /// - internal FqdnEndpointDetail(int? port) - { - Port = port; - } - - /// Gets the port. - public int? Port { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoints.Serialization.cs deleted file mode 100644 index fc92806844da..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoints.Serialization.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FqdnEndpoints - { - internal static FqdnEndpoints DeserializeFqdnEndpoints(JsonElement element) - { - Optional properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = FqdnEndpointsProperties.DeserializeFqdnEndpointsProperties(property.Value); - continue; - } - } - return new FqdnEndpoints(properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoints.cs deleted file mode 100644 index 23eef843401a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpoints.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The FqdnEndpoints. - public partial class FqdnEndpoints - { - /// Initializes a new instance of FqdnEndpoints. - internal FqdnEndpoints() - { - } - - /// Initializes a new instance of FqdnEndpoints. - /// - internal FqdnEndpoints(FqdnEndpointsProperties properties) - { - Properties = properties; - } - - /// Gets the properties. - public FqdnEndpointsProperties Properties { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointsProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointsProperties.Serialization.cs deleted file mode 100644 index 4e5349995db3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointsProperties.Serialization.cs +++ /dev/null @@ -1,46 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class FqdnEndpointsProperties - { - internal static FqdnEndpointsProperties DeserializeFqdnEndpointsProperties(JsonElement element) - { - Optional category = default; - Optional> endpoints = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("category")) - { - category = property.Value.GetString(); - continue; - } - if (property.NameEquals("endpoints")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(FqdnEndpoint.DeserializeFqdnEndpoint(item)); - } - endpoints = array; - continue; - } - } - return new FqdnEndpointsProperties(category.Value, Optional.ToList(endpoints)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointsProperties.cs deleted file mode 100644 index 174d1ee7173c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/FqdnEndpointsProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The FqdnEndpointsProperties. - public partial class FqdnEndpointsProperties - { - /// Initializes a new instance of FqdnEndpointsProperties. - internal FqdnEndpointsProperties() - { - Endpoints = new ChangeTrackingList(); - } - - /// Initializes a new instance of FqdnEndpointsProperties. - /// - /// - internal FqdnEndpointsProperties(string category, IReadOnlyList endpoints) - { - Category = category; - Endpoints = endpoints; - } - - /// Gets the category. - public string Category { get; } - /// Gets the endpoints. - public IReadOnlyList Endpoints { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Goal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Goal.cs deleted file mode 100644 index 29523c9073bc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Goal.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 -{ - /// Defines supported metric goals for hyperparameter tuning. - public readonly partial struct Goal : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Goal(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MinimizeValue = "Minimize"; - private const string MaximizeValue = "Maximize"; - - /// Minimize. - public static Goal Minimize { get; } = new Goal(MinimizeValue); - /// Maximize. - public static Goal Maximize { get; } = new Goal(MaximizeValue); - /// Determines if two values are the same. - public static bool operator ==(Goal left, Goal right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Goal left, Goal right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Goal(string value) => new Goal(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Goal other && Equals(other); - /// - public bool Equals(Goal other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GridSamplingAlgorithm.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GridSamplingAlgorithm.cs index 416a9b0fdfd8..7caf691c0125 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GridSamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/GridSamplingAlgorithm.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Defines a Sampling Algorithm that exhaustively generates every value combination in the space. + /// + /// Defines a Sampling Algorithm that exhaustively generates every value combination in the space + /// Serialized Name: GridSamplingAlgorithm + /// public partial class GridSamplingAlgorithm : SamplingAlgorithm { /// Initializes a new instance of GridSamplingAlgorithm. @@ -17,7 +20,10 @@ public GridSamplingAlgorithm() } /// Initializes a new instance of GridSamplingAlgorithm. - /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. + /// + /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties + /// Serialized Name: SamplingAlgorithm.samplingAlgorithmType + /// internal GridSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType) : base(samplingAlgorithmType) { SamplingAlgorithmType = samplingAlgorithmType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightCompute.Serialization.cs deleted file mode 100644 index 9452d5339467..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class HDInsightCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static HDInsightCompute DeserializeHDInsightCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = HDInsightProperties.DeserializeHDInsightProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new HDInsightCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightCompute.cs deleted file mode 100644 index af852ed49e89..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightCompute.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 -{ - /// A HDInsight compute. - public partial class HDInsightCompute : Compute - { - /// Initializes a new instance of HDInsightCompute. - public HDInsightCompute() - { - ComputeType = ComputeType.HDInsight; - } - - /// Initializes a new instance of HDInsightCompute. - /// 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. - /// HDInsight compute properties. - internal HDInsightCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, HDInsightProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// HDInsight compute properties. - public HDInsightProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightProperties.Serialization.cs deleted file mode 100644 index dc82593381fe..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightProperties.Serialization.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class HDInsightProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SshPort)) - { - writer.WritePropertyName("sshPort"); - writer.WriteNumberValue(SshPort.Value); - } - if (Optional.IsDefined(Address)) - { - writer.WritePropertyName("address"); - writer.WriteStringValue(Address); - } - if (Optional.IsDefined(AdministratorAccount)) - { - if (AdministratorAccount != null) - { - writer.WritePropertyName("administratorAccount"); - writer.WriteObjectValue(AdministratorAccount); - } - else - { - writer.WriteNull("administratorAccount"); - } - } - writer.WriteEndObject(); - } - - internal static HDInsightProperties DeserializeHDInsightProperties(JsonElement element) - { - Optional sshPort = default; - Optional address = default; - Optional administratorAccount = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sshPort")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sshPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("address")) - { - address = property.Value.GetString(); - continue; - } - if (property.NameEquals("administratorAccount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - administratorAccount = null; - continue; - } - administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); - continue; - } - } - return new HDInsightProperties(Optional.ToNullable(sshPort), address.Value, administratorAccount.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightProperties.cs deleted file mode 100644 index 35a7b7be0f03..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/HDInsightProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// HDInsight compute properties. - public partial class HDInsightProperties - { - /// Initializes a new instance of HDInsightProperties. - public HDInsightProperties() - { - } - - /// Initializes a new instance of HDInsightProperties. - /// Port open for ssh connections on the master node of the cluster. - /// Public IP address of the master node of the cluster. - /// Admin credentials for master node of the cluster. - internal HDInsightProperties(int? sshPort, string address, VirtualMachineSshCredentials administratorAccount) - { - SshPort = sshPort; - Address = address; - AdministratorAccount = administratorAccount; - } - - /// Port open for ssh connections on the master node of the cluster. - public int? SshPort { get; set; } - /// Public IP address of the master node of the cluster. - public string Address { get; set; } - /// Admin credentials for master node of the cluster. - public VirtualMachineSshCredentials AdministratorAccount { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdAssetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdAssetReference.Serialization.cs deleted file mode 100644 index 2846b71b80c5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdAssetReference.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class IdAssetReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("assetId"); - writer.WriteStringValue(AssetId); - writer.WritePropertyName("referenceType"); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WriteEndObject(); - } - - internal static IdAssetReference DeserializeIdAssetReference(JsonElement element) - { - string assetId = default; - ReferenceType referenceType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("assetId")) - { - assetId = property.Value.GetString(); - continue; - } - if (property.NameEquals("referenceType")) - { - referenceType = new ReferenceType(property.Value.GetString()); - continue; - } - } - return new IdAssetReference(referenceType, assetId); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdAssetReference.cs deleted file mode 100644 index 3fee994eeca7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdAssetReference.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Reference to an asset via its ARM resource ID. - public partial class IdAssetReference : AssetReferenceBase - { - /// Initializes a new instance of IdAssetReference. - /// [Required] ARM resource ID of the asset. - /// is null. - public IdAssetReference(string assetId) - { - Argument.AssertNotNull(assetId, nameof(assetId)); - - AssetId = assetId; - ReferenceType = ReferenceType.Id; - } - - /// Initializes a new instance of IdAssetReference. - /// [Required] Specifies the type of asset reference. - /// [Required] ARM resource ID of the asset. - internal IdAssetReference(ReferenceType referenceType, string assetId) : base(referenceType) - { - AssetId = assetId; - ReferenceType = referenceType; - } - - /// [Required] ARM resource ID of the asset. - public string AssetId { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfiguration.Serialization.cs deleted file mode 100644 index 51270593bdbc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfiguration.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class IdentityConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("identityType"); - writer.WriteStringValue(IdentityType.ToString()); - writer.WriteEndObject(); - } - - internal static IdentityConfiguration DeserializeIdentityConfiguration(JsonElement element) - { - if (element.TryGetProperty("identityType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AMLToken": return AmlToken.DeserializeAmlToken(element); - case "Managed": return ManagedIdentity.DeserializeManagedIdentity(element); - case "UserIdentity": return UserIdentity.DeserializeUserIdentity(element); - } - } - return UnknownIdentityConfiguration.DeserializeUnknownIdentityConfiguration(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfiguration.cs deleted file mode 100644 index 7ecfd681f331..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Base definition for identity configuration. - /// Please note is the base class. According to the scenario, a derived class 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 IdentityConfiguration - { - /// Initializes a new instance of IdentityConfiguration. - protected IdentityConfiguration() - { - } - - /// Initializes a new instance of IdentityConfiguration. - /// [Required] Specifies the type of identity framework. - internal IdentityConfiguration(IdentityConfigurationType identityType) - { - IdentityType = identityType; - } - - /// [Required] Specifies the type of identity framework. - internal IdentityConfigurationType IdentityType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfigurationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfigurationType.cs index dc78c41b8e1e..49df7b3a346c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfigurationType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityConfigurationType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine identity framework. + /// + /// Enum to determine identity framework. + /// Serialized Name: IdentityConfigurationType + /// internal readonly partial struct IdentityConfigurationType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public IdentityConfigurationType(string value) private const string AMLTokenValue = "AMLToken"; private const string UserIdentityValue = "UserIdentity"; - /// Managed. + /// + /// Managed + /// Serialized Name: IdentityConfigurationType.Managed + /// public static IdentityConfigurationType Managed { get; } = new IdentityConfigurationType(ManagedValue); - /// AMLToken. + /// + /// AMLToken + /// Serialized Name: IdentityConfigurationType.AMLToken + /// public static IdentityConfigurationType AMLToken { get; } = new IdentityConfigurationType(AMLTokenValue); - /// UserIdentity. + /// + /// UserIdentity + /// Serialized Name: IdentityConfigurationType.UserIdentity + /// public static IdentityConfigurationType UserIdentity { get; } = new IdentityConfigurationType(UserIdentityValue); /// Determines if two values are the same. public static bool operator ==(IdentityConfigurationType left, IdentityConfigurationType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityForCmk.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityForCmk.Serialization.cs deleted file mode 100644 index 771646fde8a1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityForCmk.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - internal partial class IdentityForCmk : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(UserAssignedIdentity)) - { - writer.WritePropertyName("userAssignedIdentity"); - writer.WriteStringValue(UserAssignedIdentity); - } - writer.WriteEndObject(); - } - - internal static IdentityForCmk DeserializeIdentityForCmk(JsonElement element) - { - Optional userAssignedIdentity = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userAssignedIdentity")) - { - userAssignedIdentity = property.Value.GetString(); - continue; - } - } - return new IdentityForCmk(userAssignedIdentity.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityForCmk.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityForCmk.cs deleted file mode 100644 index 8f14f2b4a8cd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/IdentityForCmk.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Identity that will be used to access key vault for encryption at rest. - internal partial class IdentityForCmk - { - /// Initializes a new instance of IdentityForCmk. - public IdentityForCmk() - { - } - - /// Initializes a new instance of IdentityForCmk. - /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. - internal IdentityForCmk(string userAssignedIdentity) - { - UserAssignedIdentity = userAssignedIdentity; - } - - /// The ArmId of the user assigned identity that will be used to access the customer managed key vault. - public string UserAssignedIdentity { 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 a2ecf3ff436e..a937e6e2c147 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 @@ -119,12 +119,12 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e Optional> searchSpace = default; ImageLimitSettings limitSettings = default; Optional sweepSettings = default; - Optional validationData = default; + Optional validationData = default; Optional validationDataSize = default; - Optional logVerbosity = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -184,7 +184,7 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("validationDataSize")) @@ -204,7 +204,7 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -224,7 +224,7 @@ internal static ImageClassification DeserializeImageClassification(JsonElement e } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 719de8779c18..77a812583d73 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassification.cs @@ -14,14 +14,21 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Image Classification. Multi-class image classification is used when an image is classified with only a single label /// from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. + /// Serialized Name: ImageClassification /// public partial class ImageClassification : AutoMLVertical { /// Initializes a new instance of ImageClassification. - /// [Required] Training data input. - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// /// or is null. - public ImageClassification(MLTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) + public ImageClassification(MachineLearningTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); Argument.AssertNotNull(limitSettings, nameof(limitSettings)); @@ -32,25 +39,54 @@ public ImageClassification(MLTableJobInput trainingData, ImageLimitSettings limi } /// Initializes a new instance of ImageClassification. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageClassification.primaryMetric + /// + /// + /// Settings used for training the model. + /// Serialized Name: ImageClassificationBase.modelSettings + /// + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageClassificationBase.searchSpace + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - /// Primary metric to optimize for this task. - /// Settings used for training the model. - /// Search space for sampling different combinations of models and their hyperparameters. - /// [Required] Limit settings for the AutoML job. - /// Model sweeping and hyperparameter sweeping related settings. - /// Validation data inputs. /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// - internal ImageClassification(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MLTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal ImageClassification(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; @@ -62,22 +98,41 @@ internal ImageClassification(LogVerbosity? logVerbosity, string targetColumnName TaskType = taskType; } - /// Primary metric to optimize for this task. + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageClassification.primaryMetric + /// public ClassificationPrimaryMetric? PrimaryMetric { get; set; } - /// Settings used for training the model. + /// + /// Settings used for training the model. + /// Serialized Name: ImageClassificationBase.modelSettings + /// public ImageModelSettingsClassification ModelSettings { get; set; } - /// Search space for sampling different combinations of models and their hyperparameters. + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageClassificationBase.searchSpace + /// public IList SearchSpace { get; set; } - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// public ImageLimitSettings LimitSettings { get; set; } - /// Model sweeping and hyperparameter sweeping related settings. + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// public ImageSweepSettings SweepSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// public double? ValidationDataSize { get; set; } } 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 c432000571d6..d2c0fb3ac9ba 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 @@ -119,12 +119,12 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult Optional> searchSpace = default; ImageLimitSettings limitSettings = default; Optional sweepSettings = default; - Optional validationData = default; + Optional validationData = default; Optional validationDataSize = default; - Optional logVerbosity = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -184,7 +184,7 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("validationDataSize")) @@ -204,7 +204,7 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -224,7 +224,7 @@ internal static ImageClassificationMultilabel DeserializeImageClassificationMult } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 c881a33aed42..c3c0826ef6cc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageClassificationMultilabel.cs @@ -14,14 +14,21 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels /// from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. + /// Serialized Name: ImageClassificationMultilabel /// public partial class ImageClassificationMultilabel : AutoMLVertical { /// Initializes a new instance of ImageClassificationMultilabel. - /// [Required] Training data input. - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// /// or is null. - public ImageClassificationMultilabel(MLTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) + public ImageClassificationMultilabel(MachineLearningTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); Argument.AssertNotNull(limitSettings, nameof(limitSettings)); @@ -32,25 +39,54 @@ public ImageClassificationMultilabel(MLTableJobInput trainingData, ImageLimitSet } /// Initializes a new instance of ImageClassificationMultilabel. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageClassificationMultilabel.primaryMetric + /// + /// + /// Settings used for training the model. + /// Serialized Name: ImageClassificationBase.modelSettings + /// + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageClassificationBase.searchSpace + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - /// Primary metric to optimize for this task. - /// Settings used for training the model. - /// Search space for sampling different combinations of models and their hyperparameters. - /// [Required] Limit settings for the AutoML job. - /// Model sweeping and hyperparameter sweeping related settings. - /// Validation data inputs. /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// - internal ImageClassificationMultilabel(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ClassificationMultilabelPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MLTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal ImageClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationMultilabelPrimaryMetric? primaryMetric, ImageModelSettingsClassification modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; @@ -62,22 +98,41 @@ internal ImageClassificationMultilabel(LogVerbosity? logVerbosity, string target TaskType = taskType; } - /// Primary metric to optimize for this task. + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageClassificationMultilabel.primaryMetric + /// public ClassificationMultilabelPrimaryMetric? PrimaryMetric { get; set; } - /// Settings used for training the model. + /// + /// Settings used for training the model. + /// Serialized Name: ImageClassificationBase.modelSettings + /// public ImageModelSettingsClassification ModelSettings { get; set; } - /// Search space for sampling different combinations of models and their hyperparameters. + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageClassificationBase.searchSpace + /// public IList SearchSpace { get; set; } - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// public ImageLimitSettings LimitSettings { get; set; } - /// Model sweeping and hyperparameter sweeping related settings. + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// public ImageSweepSettings SweepSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// public double? ValidationDataSize { get; set; } } 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 4178aad7704e..df7f41ec0781 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 @@ -119,12 +119,12 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J Optional> searchSpace = default; ImageLimitSettings limitSettings = default; Optional sweepSettings = default; - Optional validationData = default; + Optional validationData = default; Optional validationDataSize = default; - Optional logVerbosity = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -184,7 +184,7 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("validationDataSize")) @@ -204,7 +204,7 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -224,7 +224,7 @@ internal static ImageInstanceSegmentation DeserializeImageInstanceSegmentation(J } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 5df47382def8..8cca748c471f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageInstanceSegmentation.cs @@ -14,14 +14,21 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, /// drawing a polygon around each object in the image. + /// Serialized Name: ImageInstanceSegmentation /// public partial class ImageInstanceSegmentation : AutoMLVertical { /// Initializes a new instance of ImageInstanceSegmentation. - /// [Required] Training data input. - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// /// or is null. - public ImageInstanceSegmentation(MLTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) + public ImageInstanceSegmentation(MachineLearningTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); Argument.AssertNotNull(limitSettings, nameof(limitSettings)); @@ -32,25 +39,54 @@ public ImageInstanceSegmentation(MLTableJobInput trainingData, ImageLimitSetting } /// Initializes a new instance of ImageInstanceSegmentation. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageInstanceSegmentation.primaryMetric + /// + /// + /// Settings used for training the model. + /// Serialized Name: ImageObjectDetectionBase.modelSettings + /// + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageObjectDetectionBase.searchSpace + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - /// Primary metric to optimize for this task. - /// Settings used for training the model. - /// Search space for sampling different combinations of models and their hyperparameters. - /// [Required] Limit settings for the AutoML job. - /// Model sweeping and hyperparameter sweeping related settings. - /// Validation data inputs. /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// - internal ImageInstanceSegmentation(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, InstanceSegmentationPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MLTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal ImageInstanceSegmentation(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, InstanceSegmentationPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; @@ -62,22 +98,41 @@ internal ImageInstanceSegmentation(LogVerbosity? logVerbosity, string targetColu TaskType = taskType; } - /// Primary metric to optimize for this task. + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageInstanceSegmentation.primaryMetric + /// public InstanceSegmentationPrimaryMetric? PrimaryMetric { get; set; } - /// Settings used for training the model. + /// + /// Settings used for training the model. + /// Serialized Name: ImageObjectDetectionBase.modelSettings + /// public ImageModelSettingsObjectDetection ModelSettings { get; set; } - /// Search space for sampling different combinations of models and their hyperparameters. + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageObjectDetectionBase.searchSpace + /// public IList SearchSpace { get; set; } - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// public ImageLimitSettings LimitSettings { get; set; } - /// Model sweeping and hyperparameter sweeping related settings. + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// public ImageSweepSettings SweepSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// public double? ValidationDataSize { get; set; } } 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 f889f0768e4d..b2f444b7bc81 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageLimitSettings.cs @@ -9,7 +9,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Limit settings for the AutoML job. + /// + /// Limit settings for the AutoML job. + /// Serialized Name: ImageLimitSettings + /// public partial class ImageLimitSettings { /// Initializes a new instance of ImageLimitSettings. @@ -18,9 +21,18 @@ public ImageLimitSettings() } /// Initializes a new instance of ImageLimitSettings. - /// Maximum number of concurrent AutoML iterations. - /// Maximum number of AutoML iterations. - /// AutoML job timeout. + /// + /// Maximum number of concurrent AutoML iterations. + /// Serialized Name: ImageLimitSettings.maxConcurrentTrials + /// + /// + /// Maximum number of AutoML iterations. + /// Serialized Name: ImageLimitSettings.maxTrials + /// + /// + /// AutoML job timeout. + /// Serialized Name: ImageLimitSettings.timeout + /// internal ImageLimitSettings(int? maxConcurrentTrials, int? maxTrials, TimeSpan? timeout) { MaxConcurrentTrials = maxConcurrentTrials; @@ -28,11 +40,20 @@ internal ImageLimitSettings(int? maxConcurrentTrials, int? maxTrials, TimeSpan? Timeout = timeout; } - /// Maximum number of concurrent AutoML iterations. + /// + /// Maximum number of concurrent AutoML iterations. + /// Serialized Name: ImageLimitSettings.maxConcurrentTrials + /// public int? MaxConcurrentTrials { get; set; } - /// Maximum number of AutoML iterations. + /// + /// Maximum number of AutoML iterations. + /// Serialized Name: ImageLimitSettings.maxTrials + /// public int? MaxTrials { get; set; } - /// AutoML job timeout. + /// + /// AutoML job timeout. + /// Serialized Name: ImageLimitSettings.timeout + /// public TimeSpan? Timeout { get; set; } } } 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 ba850673357c..52a883a467a3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettings.cs @@ -22,6 +22,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters /// For more information on the available settings please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings /// public partial class ImageModelDistributionSettings { @@ -31,53 +32,127 @@ public ImageModelDistributionSettings() } /// Initializes a new instance of ImageModelDistributionSettings. - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. - /// 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]. - /// Whether to use distributer training. - /// Enable early stopping logic during training. + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.amsGradient + /// + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelDistributionSettings.augmentations + /// + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta1 + /// + /// + /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta2 + /// + /// + /// Whether to use distributer training. + /// Serialized Name: ImageModelDistributionSettings.distributed + /// + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelDistributionSettings.earlyStopping + /// /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingDelay /// /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingPatience + /// + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelDistributionSettings.enableOnnxNormalization + /// + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.evaluationFrequency /// - /// Enable normalization when exporting ONNX model. - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. /// /// 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.gradientAccumulationStep /// /// /// Number of layers to freeze for the model. Must be a positive integer. /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.layersToFreeze + /// + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.learningRate + /// + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelDistributionSettings.learningRateScheduler /// - /// Initial learning rate. Must be a float in the range [0, 1]. - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.modelName + /// + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.momentum + /// + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelDistributionSettings.nesterov + /// + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfEpochs + /// + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfWorkers + /// + /// + /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.optimizer + /// + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelDistributionSettings.randomSeed + /// + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.stepLRGamma + /// + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.stepLRStepSize + /// + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.trainingBatchSize + /// + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.validationBatchSize + /// + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRCycles + /// + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRWarmupEpochs + /// + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelDistributionSettings.weightDecay /// - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - /// Enable nesterov when optimizer is 'sgd'. - /// Number of training epochs. Must be a positive integer. - /// Number of data loader workers. Must be a non-negative integer. - /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - /// Random seed to be used when using deterministic training. - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - /// Training batch size. Must be a positive integer. - /// Validation batch size. Must be a positive integer. - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - /// 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]. 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) { AmsGradient = amsGradient; @@ -110,36 +185,63 @@ internal ImageModelDistributionSettings(string amsGradient, string augmentations WeightDecay = weightDecay; } - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.amsGradient + /// public string AmsGradient { get; set; } - /// Settings for using Augmentations. + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelDistributionSettings.augmentations + /// public string Augmentations { get; set; } - /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta1 + /// public string Beta1 { get; set; } - /// Value of 'beta2' 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]. + /// Serialized Name: ImageModelDistributionSettings.beta2 + /// public string Beta2 { get; set; } - /// Whether to use distributer training. + /// + /// Whether to use distributer training. + /// Serialized Name: ImageModelDistributionSettings.distributed + /// public string Distributed { get; set; } - /// Enable early stopping logic during training. + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelDistributionSettings.earlyStopping + /// public string EarlyStopping { get; set; } /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingDelay /// public string EarlyStoppingDelay { get; set; } /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingPatience /// public string EarlyStoppingPatience { get; set; } - /// Enable normalization when exporting ONNX model. + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelDistributionSettings.enableOnnxNormalization + /// public string EnableOnnxNormalization { get; set; } - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.evaluationFrequency + /// public string EvaluationFrequency { 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.gradientAccumulationStep /// public string GradientAccumulationStep { get; set; } /// @@ -147,43 +249,90 @@ internal ImageModelDistributionSettings(string amsGradient, string augmentations /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.layersToFreeze /// public string LayersToFreeze { get; set; } - /// Initial learning rate. Must be a float in the range [0, 1]. + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.learningRate + /// public string LearningRate { get; set; } - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelDistributionSettings.learningRateScheduler + /// public string LearningRateScheduler { get; set; } /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.modelName /// public string ModelName { get; set; } - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.momentum + /// public string Momentum { get; set; } - /// Enable nesterov when optimizer is 'sgd'. + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelDistributionSettings.nesterov + /// public string Nesterov { get; set; } - /// Number of training epochs. Must be a positive integer. + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfEpochs + /// public string NumberOfEpochs { get; set; } - /// Number of data loader workers. Must be a non-negative integer. + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfWorkers + /// public string NumberOfWorkers { get; set; } - /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + /// + /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.optimizer + /// public string Optimizer { get; set; } - /// Random seed to be used when using deterministic training. + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelDistributionSettings.randomSeed + /// public string RandomSeed { get; set; } - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.stepLRGamma + /// public string StepLRGamma { get; set; } - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.stepLRStepSize + /// public string StepLRStepSize { get; set; } - /// Training batch size. Must be a positive integer. + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.trainingBatchSize + /// public string TrainingBatchSize { get; set; } - /// Validation batch size. Must be a positive integer. + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.validationBatchSize + /// public string ValidationBatchSize { get; set; } - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRCycles + /// public string WarmupCosineLRCycles { get; set; } - /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRWarmupEpochs + /// public string WarmupCosineLRWarmupEpochs { get; set; } - /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelDistributionSettings.weightDecay + /// public string WeightDecay { get; set; } } } 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 ae697adeb4e8..4d461e7f497b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsClassification.cs @@ -20,6 +20,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters /// For more information on the available settings please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettingsClassification /// public partial class ImageModelDistributionSettingsClassification : ImageModelDistributionSettings { @@ -29,59 +30,143 @@ public ImageModelDistributionSettingsClassification() } /// Initializes a new instance of ImageModelDistributionSettingsClassification. - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. - /// 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]. - /// Whether to use distributer training. - /// Enable early stopping logic during training. + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.amsGradient + /// + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelDistributionSettings.augmentations + /// + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta1 + /// + /// + /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta2 + /// + /// + /// Whether to use distributer training. + /// Serialized Name: ImageModelDistributionSettings.distributed + /// + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelDistributionSettings.earlyStopping + /// /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingDelay /// /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingPatience + /// + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelDistributionSettings.enableOnnxNormalization + /// + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.evaluationFrequency /// - /// Enable normalization when exporting ONNX model. - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. /// /// 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.gradientAccumulationStep /// /// /// Number of layers to freeze for the model. Must be a positive integer. /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.layersToFreeze + /// + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.learningRate + /// + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelDistributionSettings.learningRateScheduler /// - /// Initial learning rate. Must be a float in the range [0, 1]. - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.modelName + /// + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.momentum + /// + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelDistributionSettings.nesterov + /// + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfEpochs + /// + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfWorkers + /// + /// + /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.optimizer + /// + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelDistributionSettings.randomSeed + /// + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.stepLRGamma + /// + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.stepLRStepSize + /// + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.trainingBatchSize + /// + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.validationBatchSize + /// + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRCycles + /// + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRWarmupEpochs + /// + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelDistributionSettings.weightDecay + /// + /// + /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettingsClassification.trainingCropSize + /// + /// + /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettingsClassification.validationCropSize + /// + /// + /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettingsClassification.validationResizeSize /// - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - /// Enable nesterov when optimizer is 'sgd'. - /// Number of training epochs. Must be a positive integer. - /// Number of data loader workers. Must be a non-negative integer. - /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - /// Random seed to be used when using deterministic training. - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - /// Training batch size. Must be a positive integer. - /// Validation batch size. Must be a positive integer. - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - /// 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]. - /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. - /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. - /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. /// /// 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. + /// Serialized Name: ImageModelDistributionSettingsClassification.weightedLoss /// 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, 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) { @@ -91,15 +176,25 @@ internal ImageModelDistributionSettingsClassification(string amsGradient, string WeightedLoss = weightedLoss; } - /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + /// + /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettingsClassification.trainingCropSize + /// public string TrainingCropSize { get; set; } - /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + /// + /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettingsClassification.validationCropSize + /// public string ValidationCropSize { get; set; } - /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. + /// + /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettingsClassification.validationResizeSize + /// public string ValidationResizeSize { get; set; } /// /// 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. + /// Serialized Name: ImageModelDistributionSettingsClassification.weightedLoss /// public string WeightedLoss { get; set; } } 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 2c5d4d345c2e..adf7c629b18b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelDistributionSettingsObjectDetection.cs @@ -20,6 +20,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters /// For more information on the available settings please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection /// public partial class ImageModelDistributionSettingsObjectDetection : ImageModelDistributionSettings { @@ -29,104 +30,197 @@ public ImageModelDistributionSettingsObjectDetection() } /// Initializes a new instance of ImageModelDistributionSettingsObjectDetection. - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. - /// 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]. - /// Whether to use distributer training. - /// Enable early stopping logic during training. + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.amsGradient + /// + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelDistributionSettings.augmentations + /// + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta1 + /// + /// + /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.beta2 + /// + /// + /// Whether to use distributer training. + /// Serialized Name: ImageModelDistributionSettings.distributed + /// + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelDistributionSettings.earlyStopping + /// /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingDelay /// /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.earlyStoppingPatience + /// + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelDistributionSettings.enableOnnxNormalization + /// + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.evaluationFrequency /// - /// Enable normalization when exporting ONNX model. - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. /// /// 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.gradientAccumulationStep /// /// /// Number of layers to freeze for the model. Must be a positive integer. /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.layersToFreeze + /// + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.learningRate + /// + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelDistributionSettings.learningRateScheduler /// - /// Initial learning rate. Must be a float in the range [0, 1]. - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelDistributionSettings.modelName + /// + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.momentum + /// + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelDistributionSettings.nesterov + /// + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfEpochs + /// + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelDistributionSettings.numberOfWorkers + /// + /// + /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. + /// Serialized Name: ImageModelDistributionSettings.optimizer + /// + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelDistributionSettings.randomSeed + /// + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.stepLRGamma + /// + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.stepLRStepSize + /// + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.trainingBatchSize + /// + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.validationBatchSize + /// + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRCycles + /// + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelDistributionSettings.warmupCosineLRWarmupEpochs + /// + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelDistributionSettings.weightDecay /// - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - /// Enable nesterov when optimizer is 'sgd'. - /// Number of training epochs. Must be a positive integer. - /// Number of data loader workers. Must be a non-negative integer. - /// Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - /// Random seed to be used when using deterministic training. - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - /// Training batch size. Must be a positive integer. - /// Validation batch size. Must be a positive integer. - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - /// 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]. /// /// Maximum number of detections per image, for all classes. Must be a positive integer. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.boxDetectionsPerImage /// /// /// During inference, only return proposals with a classification score greater than /// BoxScoreThreshold. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.boxScoreThreshold /// /// /// Image size for train and validation. Must be a positive integer. /// Note: The training run may get into CUDA OOM if the size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.imageSize /// /// /// Maximum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.maxSize /// /// /// Minimum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.minSize /// /// /// Model size. Must be 'small', 'medium', 'large', or 'xlarge'. /// Note: training run may get into CUDA OOM if the model size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.modelSize /// /// /// Enable multi-scale image by varying image size by +/- 50%. /// Note: training run may get into CUDA OOM if no sufficient GPU memory. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.multiScale + /// + /// + /// IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.nmsIouThreshold /// - /// IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. /// /// The grid size to use for tiling each image. Note: TileGridSize must not be /// None to enable small object detection logic. A string containing two integers in mxn format. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.tileGridSize /// /// /// Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.tileOverlapRatio /// /// /// The IOU threshold to use to perform NMS while merging predictions from tiles and image. /// Used in validation/ inference. Must be float in the range [0, 1]. /// Note: This settings is not supported for the 'yolov5' algorithm. /// NMS: Non-maximum suppression + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.tilePredictionsNmsThreshold + /// + /// + /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.validationIouThreshold + /// + /// + /// Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.validationMetricType /// - /// 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, 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) { BoxDetectionsPerImage = boxDetectionsPerImage; @@ -147,54 +241,66 @@ internal ImageModelDistributionSettingsObjectDetection(string amsGradient, strin /// /// Maximum number of detections per image, for all classes. Must be a positive integer. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.boxDetectionsPerImage /// public string BoxDetectionsPerImage { get; set; } /// /// During inference, only return proposals with a classification score greater than /// BoxScoreThreshold. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.boxScoreThreshold /// public string BoxScoreThreshold { get; set; } /// /// Image size for train and validation. Must be a positive integer. /// Note: The training run may get into CUDA OOM if the size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.imageSize /// public string ImageSize { get; set; } /// /// Maximum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.maxSize /// public string MaxSize { get; set; } /// /// Minimum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.minSize /// public string MinSize { get; set; } /// /// Model size. Must be 'small', 'medium', 'large', or 'xlarge'. /// Note: training run may get into CUDA OOM if the model size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.modelSize /// public string ModelSize { get; set; } /// /// Enable multi-scale image by varying image size by +/- 50%. /// Note: training run may get into CUDA OOM if no sufficient GPU memory. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.multiScale /// public string MultiScale { get; set; } - /// IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. + /// + /// IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.nmsIouThreshold + /// public string NmsIouThreshold { get; set; } /// /// The grid size to use for tiling each image. Note: TileGridSize must not be /// None to enable small object detection logic. A string containing two integers in mxn format. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.tileGridSize /// public string TileGridSize { get; set; } /// /// Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.tileOverlapRatio /// public string TileOverlapRatio { get; set; } /// @@ -202,11 +308,18 @@ internal ImageModelDistributionSettingsObjectDetection(string amsGradient, strin /// Used in validation/ inference. Must be float in the range [0, 1]. /// Note: This settings is not supported for the 'yolov5' algorithm. /// NMS: Non-maximum suppression + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.tilePredictionsNmsThreshold /// public string TilePredictionsNmsThreshold { get; set; } - /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + /// + /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.validationIouThreshold + /// public string ValidationIouThreshold { get; set; } - /// Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. + /// + /// Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'. + /// Serialized Name: ImageModelDistributionSettingsObjectDetection.validationMetricType + /// public string ValidationMetricType { get; set; } } } 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 d9701a31522e..9c009d1c1a09 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 @@ -396,7 +396,7 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele Optional beta1 = default; Optional beta2 = default; Optional checkpointFrequency = default; - Optional checkpointModel = default; + Optional checkpointModel = default; Optional checkpointRunId = default; Optional distributed = default; Optional earlyStopping = default; @@ -491,7 +491,7 @@ internal static ImageModelSettings DeserializeImageModelSettings(JsonElement ele checkpointModel = null; continue; } - checkpointModel = MLFlowModelJobInput.DeserializeMLFlowModelJobInput(property.Value); + checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value); continue; } if (property.NameEquals("checkpointRunId")) 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 19a0e72bf6ad..baccf2d6ada1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettings.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Settings used for training the model. /// For more information on the available settings please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings /// public partial class ImageModelSettings { @@ -20,58 +21,144 @@ public ImageModelSettings() } /// Initializes a new instance of ImageModelSettings. - /// Settings for advanced scenarios. - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. - /// 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. - /// Whether to use distributed training. - /// Enable early stopping logic during training. + /// + /// Settings for advanced scenarios. + /// Serialized Name: ImageModelSettings.advancedSettings + /// + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelSettings.amsGradient + /// + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelSettings.augmentations + /// + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta1 + /// + /// + /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta2 + /// + /// + /// Frequency to store model checkpoints. Must be a positive integer. + /// Serialized Name: ImageModelSettings.checkpointFrequency + /// + /// + /// The pretrained checkpoint model for incremental training. + /// Serialized Name: ImageModelSettings.checkpointModel + /// + /// + /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// Serialized Name: ImageModelSettings.checkpointRunId + /// + /// + /// Whether to use distributed training. + /// Serialized Name: ImageModelSettings.distributed + /// + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelSettings.earlyStopping + /// /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingDelay /// /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingPatience + /// + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelSettings.enableOnnxNormalization + /// + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelSettings.evaluationFrequency /// - /// Enable normalization when exporting ONNX model. - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. /// /// 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelSettings.gradientAccumulationStep /// /// /// Number of layers to freeze for the model. Must be a positive integer. /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.layersToFreeze + /// + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.learningRate + /// + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelSettings.learningRateScheduler /// - /// Initial learning rate. Must be a float in the range [0, 1]. - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.modelName + /// + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.momentum + /// + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelSettings.nesterov + /// + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelSettings.numberOfEpochs + /// + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelSettings.numberOfWorkers + /// + /// + /// Type of optimizer. + /// Serialized Name: ImageModelSettings.optimizer + /// + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelSettings.randomSeed + /// + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.stepLRGamma /// - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - /// Enable nesterov when optimizer is 'sgd'. - /// Number of training epochs. Must be a positive integer. - /// Number of data loader workers. Must be a non-negative integer. - /// Type of optimizer. - /// Random seed to be used when using deterministic training. - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - /// Training batch size. Must be a positive integer. - /// Validation batch size. Must be a positive integer. - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - /// 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]. - internal ImageModelSettings(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MLFlowModelJobInput 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) + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.stepLRStepSize + /// + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.trainingBatchSize + /// + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.validationBatchSize + /// + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.warmupCosineLRCycles + /// + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.warmupCosineLRWarmupEpochs + /// + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelSettings.weightDecay + /// + 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) { AdvancedSettings = advancedSettings; AmsGradient = amsGradient; @@ -107,44 +194,83 @@ internal ImageModelSettings(string advancedSettings, bool? amsGradient, string a WeightDecay = weightDecay; } - /// Settings for advanced scenarios. + /// + /// Settings for advanced scenarios. + /// Serialized Name: ImageModelSettings.advancedSettings + /// public string AdvancedSettings { get; set; } - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelSettings.amsGradient + /// public bool? AmsGradient { get; set; } - /// Settings for using Augmentations. + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelSettings.augmentations + /// public string Augmentations { get; set; } - /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta1 + /// public float? Beta1 { get; set; } - /// Value of 'beta2' 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]. + /// Serialized Name: ImageModelSettings.beta2 + /// public float? Beta2 { get; set; } - /// Frequency to store model checkpoints. Must be a positive integer. + /// + /// Frequency to store model checkpoints. Must be a positive integer. + /// Serialized Name: ImageModelSettings.checkpointFrequency + /// public int? CheckpointFrequency { get; set; } - /// The pretrained checkpoint model for incremental training. - public MLFlowModelJobInput CheckpointModel { get; set; } - /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// + /// The pretrained checkpoint model for incremental training. + /// Serialized Name: ImageModelSettings.checkpointModel + /// + public MachineLearningFlowModelJobInput CheckpointModel { get; set; } + /// + /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// Serialized Name: ImageModelSettings.checkpointRunId + /// public string CheckpointRunId { get; set; } - /// Whether to use distributed training. + /// + /// Whether to use distributed training. + /// Serialized Name: ImageModelSettings.distributed + /// public bool? Distributed { get; set; } - /// Enable early stopping logic during training. + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelSettings.earlyStopping + /// public bool? EarlyStopping { get; set; } /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingDelay /// public int? EarlyStoppingDelay { get; set; } /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingPatience /// public int? EarlyStoppingPatience { get; set; } - /// Enable normalization when exporting ONNX model. + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelSettings.enableOnnxNormalization + /// public bool? EnableOnnxNormalization { get; set; } - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelSettings.evaluationFrequency + /// public int? EvaluationFrequency { 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelSettings.gradientAccumulationStep /// public int? GradientAccumulationStep { get; set; } /// @@ -152,43 +278,90 @@ internal ImageModelSettings(string advancedSettings, bool? amsGradient, string a /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.layersToFreeze /// public int? LayersToFreeze { get; set; } - /// Initial learning rate. Must be a float in the range [0, 1]. + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.learningRate + /// public float? LearningRate { get; set; } - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelSettings.learningRateScheduler + /// public LearningRateScheduler? LearningRateScheduler { get; set; } /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.modelName /// public string ModelName { get; set; } - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.momentum + /// public float? Momentum { get; set; } - /// Enable nesterov when optimizer is 'sgd'. + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelSettings.nesterov + /// public bool? Nesterov { get; set; } - /// Number of training epochs. Must be a positive integer. + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelSettings.numberOfEpochs + /// public int? NumberOfEpochs { get; set; } - /// Number of data loader workers. Must be a non-negative integer. + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelSettings.numberOfWorkers + /// public int? NumberOfWorkers { get; set; } - /// Type of optimizer. + /// + /// Type of optimizer. + /// Serialized Name: ImageModelSettings.optimizer + /// public StochasticOptimizer? Optimizer { get; set; } - /// Random seed to be used when using deterministic training. + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelSettings.randomSeed + /// public int? RandomSeed { get; set; } - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.stepLRGamma + /// public float? StepLRGamma { get; set; } - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.stepLRStepSize + /// public int? StepLRStepSize { get; set; } - /// Training batch size. Must be a positive integer. + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.trainingBatchSize + /// public int? TrainingBatchSize { get; set; } - /// Validation batch size. Must be a positive integer. + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.validationBatchSize + /// public int? ValidationBatchSize { get; set; } - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.warmupCosineLRCycles + /// public float? WarmupCosineLRCycles { get; set; } - /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.warmupCosineLRWarmupEpochs + /// public int? WarmupCosineLRWarmupEpochs { get; set; } - /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelSettings.weightDecay + /// public float? WeightDecay { get; set; } } } 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 53831c40afa8..89585110c0f1 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 @@ -448,7 +448,7 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl Optional beta1 = default; Optional beta2 = default; Optional checkpointFrequency = default; - Optional checkpointModel = default; + Optional checkpointModel = default; Optional checkpointRunId = default; Optional distributed = default; Optional earlyStopping = default; @@ -583,7 +583,7 @@ internal static ImageModelSettingsClassification DeserializeImageModelSettingsCl checkpointModel = null; continue; } - checkpointModel = MLFlowModelJobInput.DeserializeMLFlowModelJobInput(property.Value); + checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value); continue; } if (property.NameEquals("checkpointRunId")) 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 2083dd31efba..b5b0d178e4d7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsClassification.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Settings used for training the model. /// For more information on the available settings please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettingsClassification /// public partial class ImageModelSettingsClassification : ImageModelSettings { @@ -20,65 +21,161 @@ public ImageModelSettingsClassification() } /// Initializes a new instance of ImageModelSettingsClassification. - /// Settings for advanced scenarios. - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. - /// 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. - /// Whether to use distributed training. - /// Enable early stopping logic during training. + /// + /// Settings for advanced scenarios. + /// Serialized Name: ImageModelSettings.advancedSettings + /// + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelSettings.amsGradient + /// + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelSettings.augmentations + /// + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta1 + /// + /// + /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta2 + /// + /// + /// Frequency to store model checkpoints. Must be a positive integer. + /// Serialized Name: ImageModelSettings.checkpointFrequency + /// + /// + /// The pretrained checkpoint model for incremental training. + /// Serialized Name: ImageModelSettings.checkpointModel + /// + /// + /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// Serialized Name: ImageModelSettings.checkpointRunId + /// + /// + /// Whether to use distributed training. + /// Serialized Name: ImageModelSettings.distributed + /// + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelSettings.earlyStopping + /// /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingDelay /// /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingPatience + /// + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelSettings.enableOnnxNormalization + /// + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelSettings.evaluationFrequency /// - /// Enable normalization when exporting ONNX model. - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. /// /// 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelSettings.gradientAccumulationStep /// /// /// Number of layers to freeze for the model. Must be a positive integer. /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.layersToFreeze + /// + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.learningRate + /// + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelSettings.learningRateScheduler /// - /// Initial learning rate. Must be a float in the range [0, 1]. - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.modelName + /// + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.momentum + /// + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelSettings.nesterov + /// + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelSettings.numberOfEpochs + /// + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelSettings.numberOfWorkers + /// + /// + /// Type of optimizer. + /// Serialized Name: ImageModelSettings.optimizer + /// + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelSettings.randomSeed + /// + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.stepLRGamma + /// + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.stepLRStepSize + /// + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.trainingBatchSize + /// + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.validationBatchSize + /// + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.warmupCosineLRCycles + /// + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.warmupCosineLRWarmupEpochs + /// + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelSettings.weightDecay + /// + /// + /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + /// Serialized Name: ImageModelSettingsClassification.trainingCropSize + /// + /// + /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelSettingsClassification.validationCropSize + /// + /// + /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelSettingsClassification.validationResizeSize /// - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - /// Enable nesterov when optimizer is 'sgd'. - /// Number of training epochs. Must be a positive integer. - /// Number of data loader workers. Must be a non-negative integer. - /// Type of optimizer. - /// Random seed to be used when using deterministic training. - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - /// Training batch size. Must be a positive integer. - /// Validation batch size. Must be a positive integer. - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - /// 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]. - /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. - /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. - /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. /// /// 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. + /// Serialized Name: ImageModelSettingsClassification.weightedLoss /// - internal ImageModelSettingsClassification(string advancedSettings, bool? amsGradient, string augmentations, float? beta1, float? beta2, int? checkpointFrequency, MLFlowModelJobInput 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, 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) + 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, 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) { TrainingCropSize = trainingCropSize; ValidationCropSize = validationCropSize; @@ -86,15 +183,25 @@ internal ImageModelSettingsClassification(string advancedSettings, bool? amsGrad WeightedLoss = weightedLoss; } - /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + /// + /// Image crop size that is input to the neural network for the training dataset. Must be a positive integer. + /// Serialized Name: ImageModelSettingsClassification.trainingCropSize + /// public int? TrainingCropSize { get; set; } - /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + /// + /// Image crop size that is input to the neural network for the validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelSettingsClassification.validationCropSize + /// public int? ValidationCropSize { get; set; } - /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. + /// + /// Image size to which to resize before cropping for validation dataset. Must be a positive integer. + /// Serialized Name: ImageModelSettingsClassification.validationResizeSize + /// public int? ValidationResizeSize { get; set; } /// /// 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. + /// Serialized Name: ImageModelSettingsClassification.weightedLoss /// public int? WeightedLoss { get; set; } } 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 65a66ccdb91a..2b652df16e9b 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 @@ -537,7 +537,7 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO Optional imageSize = default; Optional maxSize = default; Optional minSize = default; - Optional modelSize = default; + Optional modelSize = default; Optional multiScale = default; Optional nmsIouThreshold = default; Optional tileGridSize = default; @@ -551,7 +551,7 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO Optional beta1 = default; Optional beta2 = default; Optional checkpointFrequency = default; - Optional checkpointModel = default; + Optional checkpointModel = default; Optional checkpointRunId = default; Optional distributed = default; Optional earlyStopping = default; @@ -636,7 +636,7 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO property.ThrowNonNullablePropertyIsNull(); continue; } - modelSize = new ModelSize(property.Value.GetString()); + modelSize = new MachineLearningModelSize(property.Value.GetString()); continue; } if (property.NameEquals("multiScale")) @@ -776,7 +776,7 @@ internal static ImageModelSettingsObjectDetection DeserializeImageModelSettingsO checkpointModel = null; continue; } - checkpointModel = MLFlowModelJobInput.DeserializeMLFlowModelJobInput(property.Value); + checkpointModel = MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(property.Value); continue; } if (property.NameEquals("checkpointRunId")) 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 d305460f9884..fc879203eb97 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageModelSettingsObjectDetection.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Settings used for training the model. /// For more information on the available settings please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettingsObjectDetection /// public partial class ImageModelSettingsObjectDetection : ImageModelSettings { @@ -20,108 +21,213 @@ public ImageModelSettingsObjectDetection() } /// Initializes a new instance of ImageModelSettingsObjectDetection. - /// Settings for advanced scenarios. - /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. - /// 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. - /// Whether to use distributed training. - /// Enable early stopping logic during training. + /// + /// Settings for advanced scenarios. + /// Serialized Name: ImageModelSettings.advancedSettings + /// + /// + /// Enable AMSGrad when optimizer is 'adam' or 'adamw'. + /// Serialized Name: ImageModelSettings.amsGradient + /// + /// + /// Settings for using Augmentations. + /// Serialized Name: ImageModelSettings.augmentations + /// + /// + /// Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta1 + /// + /// + /// Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.beta2 + /// + /// + /// Frequency to store model checkpoints. Must be a positive integer. + /// Serialized Name: ImageModelSettings.checkpointFrequency + /// + /// + /// The pretrained checkpoint model for incremental training. + /// Serialized Name: ImageModelSettings.checkpointModel + /// + /// + /// The id of a previous run that has a pretrained checkpoint for incremental training. + /// Serialized Name: ImageModelSettings.checkpointRunId + /// + /// + /// Whether to use distributed training. + /// Serialized Name: ImageModelSettings.distributed + /// + /// + /// Enable early stopping logic during training. + /// Serialized Name: ImageModelSettings.earlyStopping + /// /// /// Minimum number of epochs or validation evaluations to wait before primary metric improvement /// is tracked for early stopping. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingDelay /// /// /// Minimum number of epochs or validation evaluations with no primary metric improvement before /// the run is stopped. Must be a positive integer. + /// Serialized Name: ImageModelSettings.earlyStoppingPatience + /// + /// + /// Enable normalization when exporting ONNX model. + /// Serialized Name: ImageModelSettings.enableOnnxNormalization + /// + /// + /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. + /// Serialized Name: ImageModelSettings.evaluationFrequency /// - /// Enable normalization when exporting ONNX model. - /// Frequency to evaluate validation dataset to get metric scores. Must be a positive integer. /// /// 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 /// the accumulated gradients to compute the weight updates. Must be a positive integer. + /// Serialized Name: ImageModelSettings.gradientAccumulationStep /// /// /// Number of layers to freeze for the model. Must be a positive integer. /// For instance, passing 2 as value for 'seresnext' means /// freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please /// see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.layersToFreeze + /// + /// + /// Initial learning rate. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.learningRate + /// + /// + /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. + /// Serialized Name: ImageModelSettings.learningRateScheduler /// - /// Initial learning rate. Must be a float in the range [0, 1]. - /// Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. /// /// Name of the model to use for training. /// For more information on the available models please visit the official documentation: /// https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. + /// Serialized Name: ImageModelSettings.modelName + /// + /// + /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.momentum + /// + /// + /// Enable nesterov when optimizer is 'sgd'. + /// Serialized Name: ImageModelSettings.nesterov + /// + /// + /// Number of training epochs. Must be a positive integer. + /// Serialized Name: ImageModelSettings.numberOfEpochs + /// + /// + /// Number of data loader workers. Must be a non-negative integer. + /// Serialized Name: ImageModelSettings.numberOfWorkers + /// + /// + /// Type of optimizer. + /// Serialized Name: ImageModelSettings.optimizer + /// + /// + /// Random seed to be used when using deterministic training. + /// Serialized Name: ImageModelSettings.randomSeed + /// + /// + /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.stepLRGamma + /// + /// + /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.stepLRStepSize + /// + /// + /// Training batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.trainingBatchSize + /// + /// + /// Validation batch size. Must be a positive integer. + /// Serialized Name: ImageModelSettings.validationBatchSize + /// + /// + /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettings.warmupCosineLRCycles + /// + /// + /// Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer. + /// Serialized Name: ImageModelSettings.warmupCosineLRWarmupEpochs + /// + /// + /// Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelSettings.weightDecay /// - /// Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1]. - /// Enable nesterov when optimizer is 'sgd'. - /// Number of training epochs. Must be a positive integer. - /// Number of data loader workers. Must be a non-negative integer. - /// Type of optimizer. - /// Random seed to be used when using deterministic training. - /// Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1]. - /// Value of step size when learning rate scheduler is 'step'. Must be a positive integer. - /// Training batch size. Must be a positive integer. - /// Validation batch size. Must be a positive integer. - /// Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1]. - /// 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]. /// /// Maximum number of detections per image, for all classes. Must be a positive integer. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.boxDetectionsPerImage /// /// /// During inference, only return proposals with a classification score greater than /// BoxScoreThreshold. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelSettingsObjectDetection.boxScoreThreshold /// /// /// Image size for train and validation. Must be a positive integer. /// Note: The training run may get into CUDA OOM if the size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.imageSize /// /// /// Maximum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.maxSize /// /// /// Minimum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.minSize /// /// /// Model size. Must be 'small', 'medium', 'large', or 'xlarge'. /// Note: training run may get into CUDA OOM if the model size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.modelSize /// /// /// Enable multi-scale image by varying image size by +/- 50%. /// Note: training run may get into CUDA OOM if no sufficient GPU memory. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.multiScale + /// + /// + /// IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettingsObjectDetection.nmsIouThreshold /// - /// IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. /// /// The grid size to use for tiling each image. Note: TileGridSize must not be /// None to enable small object detection logic. A string containing two integers in mxn format. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.tileGridSize /// /// /// Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.tileOverlapRatio /// /// /// The IOU threshold to use to perform NMS while merging predictions from tiles and image. /// Used in validation/ inference. Must be float in the range [0, 1]. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.tilePredictionsNmsThreshold + /// + /// + /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + /// Serialized Name: ImageModelSettingsObjectDetection.validationIouThreshold + /// + /// + /// Metric computation method to use for validation metrics. + /// Serialized Name: ImageModelSettingsObjectDetection.validationMetricType /// - /// 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, MLFlowModelJobInput 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, int? boxDetectionsPerImage, float? boxScoreThreshold, int? imageSize, int? maxSize, int? minSize, ModelSize? 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) + 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, 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) { BoxDetectionsPerImage = boxDetectionsPerImage; BoxScoreThreshold = boxScoreThreshold; @@ -141,65 +247,84 @@ internal ImageModelSettingsObjectDetection(string advancedSettings, bool? amsGra /// /// Maximum number of detections per image, for all classes. Must be a positive integer. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.boxDetectionsPerImage /// public int? BoxDetectionsPerImage { get; set; } /// /// During inference, only return proposals with a classification score greater than /// BoxScoreThreshold. Must be a float in the range[0, 1]. + /// Serialized Name: ImageModelSettingsObjectDetection.boxScoreThreshold /// public float? BoxScoreThreshold { get; set; } /// /// Image size for train and validation. Must be a positive integer. /// Note: The training run may get into CUDA OOM if the size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.imageSize /// public int? ImageSize { get; set; } /// /// Maximum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.maxSize /// public int? MaxSize { get; set; } /// /// Minimum size of the image to be rescaled before feeding it to the backbone. /// Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.minSize /// public int? MinSize { get; set; } /// /// Model size. Must be 'small', 'medium', 'large', or 'xlarge'. /// Note: training run may get into CUDA OOM if the model size is too big. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.modelSize /// - public ModelSize? ModelSize { get; set; } + public MachineLearningModelSize? ModelSize { get; set; } /// /// Enable multi-scale image by varying image size by +/- 50%. /// Note: training run may get into CUDA OOM if no sufficient GPU memory. /// Note: This settings is only supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.multiScale /// public bool? MultiScale { get; set; } - /// IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. + /// + /// IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1]. + /// Serialized Name: ImageModelSettingsObjectDetection.nmsIouThreshold + /// public float? NmsIouThreshold { get; set; } /// /// The grid size to use for tiling each image. Note: TileGridSize must not be /// None to enable small object detection logic. A string containing two integers in mxn format. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.tileGridSize /// public string TileGridSize { get; set; } /// /// Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.tileOverlapRatio /// public float? TileOverlapRatio { get; set; } /// /// The IOU threshold to use to perform NMS while merging predictions from tiles and image. /// Used in validation/ inference. Must be float in the range [0, 1]. /// Note: This settings is not supported for the 'yolov5' algorithm. + /// Serialized Name: ImageModelSettingsObjectDetection.tilePredictionsNmsThreshold /// public float? TilePredictionsNmsThreshold { get; set; } - /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + /// + /// IOU threshold to use when computing validation metric. Must be float in the range [0, 1]. + /// Serialized Name: ImageModelSettingsObjectDetection.validationIouThreshold + /// public float? ValidationIouThreshold { get; set; } - /// Metric computation method to use for validation metrics. + /// + /// Metric computation method to use for validation metrics. + /// Serialized Name: ImageModelSettingsObjectDetection.validationMetricType + /// public ValidationMetricType? ValidationMetricType { get; set; } } } 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 3821f71a80ec..f28947c161f1 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 @@ -119,12 +119,12 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement Optional> searchSpace = default; ImageLimitSettings limitSettings = default; Optional sweepSettings = default; - Optional validationData = default; + Optional validationData = default; Optional validationDataSize = default; - Optional logVerbosity = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -184,7 +184,7 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("validationDataSize")) @@ -204,7 +204,7 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -224,7 +224,7 @@ internal static ImageObjectDetection DeserializeImageObjectDetection(JsonElement } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 4c55855ab811..256cf69f390e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageObjectDetection.cs @@ -14,14 +14,21 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Image Object Detection. Object detection is used to identify objects in an image and locate each object with a /// bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. + /// Serialized Name: ImageObjectDetection /// public partial class ImageObjectDetection : AutoMLVertical { /// Initializes a new instance of ImageObjectDetection. - /// [Required] Training data input. - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// /// or is null. - public ImageObjectDetection(MLTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) + public ImageObjectDetection(MachineLearningTableJobInput trainingData, ImageLimitSettings limitSettings) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); Argument.AssertNotNull(limitSettings, nameof(limitSettings)); @@ -32,25 +39,54 @@ public ImageObjectDetection(MLTableJobInput trainingData, ImageLimitSettings lim } /// Initializes a new instance of ImageObjectDetection. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageObjectDetection.primaryMetric + /// + /// + /// Settings used for training the model. + /// Serialized Name: ImageObjectDetectionBase.modelSettings + /// + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageObjectDetectionBase.searchSpace + /// + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - /// Primary metric to optimize for this task. - /// Settings used for training the model. - /// Search space for sampling different combinations of models and their hyperparameters. - /// [Required] Limit settings for the AutoML job. - /// Model sweeping and hyperparameter sweeping related settings. - /// Validation data inputs. /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// - internal ImageObjectDetection(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ObjectDetectionPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MLTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal ImageObjectDetection(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ObjectDetectionPrimaryMetric? primaryMetric, ImageModelSettingsObjectDetection modelSettings, IList searchSpace, ImageLimitSettings limitSettings, ImageSweepSettings sweepSettings, MachineLearningTableJobInput validationData, double? validationDataSize) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; ModelSettings = modelSettings; @@ -62,22 +98,41 @@ internal ImageObjectDetection(LogVerbosity? logVerbosity, string targetColumnNam TaskType = taskType; } - /// Primary metric to optimize for this task. + /// + /// Primary metric to optimize for this task. + /// Serialized Name: ImageObjectDetection.primaryMetric + /// public ObjectDetectionPrimaryMetric? PrimaryMetric { get; set; } - /// Settings used for training the model. + /// + /// Settings used for training the model. + /// Serialized Name: ImageObjectDetectionBase.modelSettings + /// public ImageModelSettingsObjectDetection ModelSettings { get; set; } - /// Search space for sampling different combinations of models and their hyperparameters. + /// + /// Search space for sampling different combinations of models and their hyperparameters. + /// Serialized Name: ImageObjectDetectionBase.searchSpace + /// public IList SearchSpace { get; set; } - /// [Required] Limit settings for the AutoML job. + /// + /// [Required] Limit settings for the AutoML job. + /// Serialized Name: ImageVertical.limitSettings + /// public ImageLimitSettings LimitSettings { get; set; } - /// Model sweeping and hyperparameter sweeping related settings. + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageVertical.sweepSettings + /// public ImageSweepSettings SweepSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: ImageVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } /// /// 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. + /// Serialized Name: ImageVertical.validationDataSize /// public double? ValidationDataSize { get; set; } } 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 8cdf12575e46..5534dd74167f 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 @@ -34,7 +34,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static ImageSweepSettings DeserializeImageSweepSettings(JsonElement element) { - Optional earlyTermination = default; + Optional earlyTermination = default; SamplingAlgorithmType samplingAlgorithm = default; foreach (var property in element.EnumerateObject()) { @@ -45,7 +45,7 @@ internal static ImageSweepSettings DeserializeImageSweepSettings(JsonElement ele earlyTermination = null; continue; } - earlyTermination = EarlyTerminationPolicy.DeserializeEarlyTerminationPolicy(property.Value); + earlyTermination = MachineLearningEarlyTerminationPolicy.DeserializeMachineLearningEarlyTerminationPolicy(property.Value); continue; } if (property.NameEquals("samplingAlgorithm")) 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 f2c8f6978aba..166a99c0c106 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ImageSweepSettings.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Model sweeping and hyperparameter sweeping related settings. + /// + /// Model sweeping and hyperparameter sweeping related settings. + /// Serialized Name: ImageSweepSettings + /// public partial class ImageSweepSettings { /// Initializes a new instance of ImageSweepSettings. - /// [Required] Type of the hyperparameter sampling algorithms. + /// + /// [Required] Type of the hyperparameter sampling algorithms. + /// Serialized Name: ImageSweepSettings.samplingAlgorithm + /// public ImageSweepSettings(SamplingAlgorithmType samplingAlgorithm) { SamplingAlgorithm = samplingAlgorithm; @@ -20,11 +26,15 @@ public ImageSweepSettings(SamplingAlgorithmType samplingAlgorithm) /// Initializes a new instance of ImageSweepSettings. /// /// 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. + /// Serialized Name: ImageSweepSettings.earlyTermination + /// Please note is the base class. According to the scenario, a derived class 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. - internal ImageSweepSettings(EarlyTerminationPolicy earlyTermination, SamplingAlgorithmType samplingAlgorithm) + /// + /// [Required] Type of the hyperparameter sampling algorithms. + /// Serialized Name: ImageSweepSettings.samplingAlgorithm + /// + internal ImageSweepSettings(MachineLearningEarlyTerminationPolicy earlyTermination, SamplingAlgorithmType samplingAlgorithm) { EarlyTermination = earlyTermination; SamplingAlgorithm = samplingAlgorithm; @@ -32,11 +42,15 @@ internal ImageSweepSettings(EarlyTerminationPolicy earlyTermination, SamplingAlg /// /// 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. + /// Serialized Name: ImageSweepSettings.earlyTermination + /// Please note is the base class. According to the scenario, a derived class 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 EarlyTerminationPolicy EarlyTermination { get; set; } - /// [Required] Type of the hyperparameter sampling algorithms. + public MachineLearningEarlyTerminationPolicy EarlyTermination { get; set; } + /// + /// [Required] Type of the hyperparameter sampling algorithms. + /// Serialized Name: ImageSweepSettings.samplingAlgorithm + /// public SamplingAlgorithmType SamplingAlgorithm { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferenceContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferenceContainerProperties.Serialization.cs deleted file mode 100644 index 30ea7bef917a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferenceContainerProperties.Serialization.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class InferenceContainerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(LivenessRoute)) - { - writer.WritePropertyName("livenessRoute"); - writer.WriteObjectValue(LivenessRoute); - } - if (Optional.IsDefined(ReadinessRoute)) - { - writer.WritePropertyName("readinessRoute"); - writer.WriteObjectValue(ReadinessRoute); - } - if (Optional.IsDefined(ScoringRoute)) - { - writer.WritePropertyName("scoringRoute"); - writer.WriteObjectValue(ScoringRoute); - } - writer.WriteEndObject(); - } - - internal static InferenceContainerProperties DeserializeInferenceContainerProperties(JsonElement element) - { - Optional livenessRoute = default; - Optional readinessRoute = default; - Optional scoringRoute = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("livenessRoute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - livenessRoute = Route.DeserializeRoute(property.Value); - continue; - } - if (property.NameEquals("readinessRoute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - readinessRoute = Route.DeserializeRoute(property.Value); - continue; - } - if (property.NameEquals("scoringRoute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - scoringRoute = Route.DeserializeRoute(property.Value); - continue; - } - } - return new InferenceContainerProperties(livenessRoute.Value, readinessRoute.Value, scoringRoute.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferenceContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferenceContainerProperties.cs deleted file mode 100644 index 4700206104f6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InferenceContainerProperties.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The InferenceContainerProperties. - public partial class InferenceContainerProperties - { - /// Initializes a new instance of InferenceContainerProperties. - public InferenceContainerProperties() - { - } - - /// Initializes a new instance of InferenceContainerProperties. - /// The route to check the liveness of the inference server container. - /// The route to check the readiness of the inference server container. - /// The port to send the scoring requests to, within the inference server container. - internal InferenceContainerProperties(Route livenessRoute, Route readinessRoute, Route scoringRoute) - { - LivenessRoute = livenessRoute; - ReadinessRoute = readinessRoute; - ScoringRoute = scoringRoute; - } - - /// The route to check the liveness of the inference server container. - public Route LivenessRoute { get; set; } - /// The route to check the readiness of the inference server container. - public Route ReadinessRoute { get; set; } - /// The port to send the scoring requests to, within the inference server container. - public Route ScoringRoute { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputDeliveryMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputDeliveryMode.cs deleted file mode 100644 index 512b65f03cb6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InputDeliveryMode.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 -{ - /// Enum to determine the input data delivery mode. - public readonly partial struct InputDeliveryMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public InputDeliveryMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ReadOnlyMountValue = "ReadOnlyMount"; - private const string ReadWriteMountValue = "ReadWriteMount"; - private const string DownloadValue = "Download"; - private const string DirectValue = "Direct"; - private const string EvalMountValue = "EvalMount"; - private const string EvalDownloadValue = "EvalDownload"; - - /// ReadOnlyMount. - public static InputDeliveryMode ReadOnlyMount { get; } = new InputDeliveryMode(ReadOnlyMountValue); - /// ReadWriteMount. - public static InputDeliveryMode ReadWriteMount { get; } = new InputDeliveryMode(ReadWriteMountValue); - /// Download. - public static InputDeliveryMode Download { get; } = new InputDeliveryMode(DownloadValue); - /// Direct. - public static InputDeliveryMode Direct { get; } = new InputDeliveryMode(DirectValue); - /// EvalMount. - public static InputDeliveryMode EvalMount { get; } = new InputDeliveryMode(EvalMountValue); - /// EvalDownload. - public static InputDeliveryMode EvalDownload { get; } = new InputDeliveryMode(EvalDownloadValue); - /// Determines if two values are the same. - public static bool operator ==(InputDeliveryMode left, InputDeliveryMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(InputDeliveryMode left, InputDeliveryMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator InputDeliveryMode(string value) => new InputDeliveryMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InputDeliveryMode other && Equals(other); - /// - public bool Equals(InputDeliveryMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceSegmentationPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceSegmentationPrimaryMetric.cs index 7567ff9e7ff9..a97e1dd80696 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceSegmentationPrimaryMetric.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceSegmentationPrimaryMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Primary metrics for InstanceSegmentation tasks. + /// + /// Primary metrics for InstanceSegmentation tasks. + /// Serialized Name: InstanceSegmentationPrimaryMetrics + /// public readonly partial struct InstanceSegmentationPrimaryMetric : IEquatable { private readonly string _value; @@ -27,6 +30,7 @@ public InstanceSegmentationPrimaryMetric(string value) /// /// Mean Average Precision (MAP) is the average of AP (Average Precision). /// AP is calculated for each class and averaged to get the MAP. + /// Serialized Name: InstanceSegmentationPrimaryMetrics.MeanAveragePrecision /// public static InstanceSegmentationPrimaryMetric MeanAveragePrecision { get; } = new InstanceSegmentationPrimaryMetric(MeanAveragePrecisionValue); /// Determines if two values are the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchema.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchema.Serialization.cs deleted file mode 100644 index 6767f5d8fa0e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchema.Serialization.cs +++ /dev/null @@ -1,87 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class InstanceTypeSchema : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(NodeSelector)) - { - if (NodeSelector != null) - { - writer.WritePropertyName("nodeSelector"); - writer.WriteStartObject(); - foreach (var item in NodeSelector) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("nodeSelector"); - } - } - if (Optional.IsDefined(Resources)) - { - writer.WritePropertyName("resources"); - writer.WriteObjectValue(Resources); - } - writer.WriteEndObject(); - } - - internal static InstanceTypeSchema DeserializeInstanceTypeSchema(JsonElement element) - { - Optional> nodeSelector = default; - Optional resources = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("nodeSelector")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nodeSelector = 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, property0.Value.GetString()); - } - } - nodeSelector = dictionary; - continue; - } - if (property.NameEquals("resources")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - resources = InstanceTypeSchemaResources.DeserializeInstanceTypeSchemaResources(property.Value); - continue; - } - } - return new InstanceTypeSchema(Optional.ToDictionary(nodeSelector), resources.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchema.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchema.cs deleted file mode 100644 index e3223f91217f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchema.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Instance type schema. - public partial class InstanceTypeSchema - { - /// Initializes a new instance of InstanceTypeSchema. - public InstanceTypeSchema() - { - NodeSelector = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of InstanceTypeSchema. - /// Node Selector. - /// Resource requests/limits for this instance type. - internal InstanceTypeSchema(IDictionary nodeSelector, InstanceTypeSchemaResources resources) - { - NodeSelector = nodeSelector; - Resources = resources; - } - - /// Node Selector. - public IDictionary NodeSelector { get; set; } - /// Resource requests/limits for this instance type. - public InstanceTypeSchemaResources Resources { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchemaResources.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchemaResources.Serialization.cs deleted file mode 100644 index 858d83e33b69..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchemaResources.Serialization.cs +++ /dev/null @@ -1,84 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class InstanceTypeSchemaResources : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Requests)) - { - writer.WritePropertyName("requests"); - writer.WriteStartObject(); - foreach (var item in Requests) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(Limits)) - { - writer.WritePropertyName("limits"); - writer.WriteStartObject(); - foreach (var item in Limits) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static InstanceTypeSchemaResources DeserializeInstanceTypeSchemaResources(JsonElement element) - { - Optional> requests = default; - Optional> limits = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("requests")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - requests = dictionary; - continue; - } - if (property.NameEquals("limits")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - limits = dictionary; - continue; - } - } - return new InstanceTypeSchemaResources(Optional.ToDictionary(requests), Optional.ToDictionary(limits)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchemaResources.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchemaResources.cs deleted file mode 100644 index c726604ff0da..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/InstanceTypeSchemaResources.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Resource requests/limits for this instance type. - public partial class InstanceTypeSchemaResources - { - /// Initializes a new instance of InstanceTypeSchemaResources. - public InstanceTypeSchemaResources() - { - Requests = new ChangeTrackingDictionary(); - Limits = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of InstanceTypeSchemaResources. - /// Resource requests for this instance type. - /// Resource limits for this instance type. - internal InstanceTypeSchemaResources(IDictionary requests, IDictionary limits) - { - Requests = requests; - Limits = limits; - } - - /// Resource requests for this instance type. - public IDictionary Requests { get; } - /// Resource limits for this instance type. - public IDictionary Limits { get; } - } -} 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 d28763e5925e..b8388d0a164f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobBaseResourceArmPaginatedResult.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of JobBase entities. + /// + /// A paginated list of JobBase entities. + /// Serialized Name: JobBaseResourceArmPaginatedResult + /// internal partial class JobBaseResourceArmPaginatedResult { /// Initializes a new instance of JobBaseResourceArmPaginatedResult. @@ -21,17 +24,29 @@ internal JobBaseResourceArmPaginatedResult() } /// Initializes a new instance of JobBaseResourceArmPaginatedResult. - /// 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. + /// Serialized Name: JobBaseResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type JobBase. + /// Serialized Name: JobBaseResourceArmPaginatedResult.value + /// internal JobBaseResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of JobBase objects. If null, there are no additional pages. + /// + /// The link to the next page of JobBase objects. If null, there are no additional pages. + /// Serialized Name: JobBaseResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type JobBase. + /// + /// An array of objects of type JobBase. + /// Serialized Name: JobBaseResourceArmPaginatedResult.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInput.Serialization.cs deleted file mode 100644 index 9285dd1fef09..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInput.Serialization.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static JobInput DeserializeJobInput(JsonElement element) - { - if (element.TryGetProperty("jobInputType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "custom_model": return CustomModelJobInput.DeserializeCustomModelJobInput(element); - case "literal": return LiteralJobInput.DeserializeLiteralJobInput(element); - case "mlflow_model": return MLFlowModelJobInput.DeserializeMLFlowModelJobInput(element); - case "mltable": return MLTableJobInput.DeserializeMLTableJobInput(element); - case "triton_model": return TritonModelJobInput.DeserializeTritonModelJobInput(element); - case "uri_file": return UriFileJobInput.DeserializeUriFileJobInput(element); - case "uri_folder": return UriFolderJobInput.DeserializeUriFolderJobInput(element); - } - } - return UnknownJobInput.DeserializeUnknownJobInput(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInput.cs deleted file mode 100644 index bd8a15528805..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInput.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Command job definition. - /// Please note is the base class. According to the scenario, a derived class 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 JobInput - { - /// Initializes a new instance of JobInput. - protected JobInput() - { - } - - /// Initializes a new instance of JobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - internal JobInput(string description, JobInputType jobInputType) - { - Description = description; - JobInputType = jobInputType; - } - - /// Description for the input. - public string Description { get; set; } - /// [Required] Specifies the type of job. - internal JobInputType JobInputType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs index cbe9c2f4d0db..fe6126390831 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobInputType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the Job Input Type. + /// + /// Enum to determine the Job Input Type. + /// Serialized Name: JobInputType + /// internal readonly partial struct JobInputType : IEquatable { private readonly string _value; @@ -30,19 +33,40 @@ public JobInputType(string value) private const string MlflowModelValue = "mlflow_model"; private const string TritonModelValue = "triton_model"; - /// literal. + /// + /// literal + /// Serialized Name: JobInputType.literal + /// public static JobInputType Literal { get; } = new JobInputType(LiteralValue); - /// uri_file. + /// + /// uri_file + /// Serialized Name: JobInputType.uri_file + /// public static JobInputType UriFile { get; } = new JobInputType(UriFileValue); - /// uri_folder. + /// + /// uri_folder + /// Serialized Name: JobInputType.uri_folder + /// public static JobInputType UriFolder { get; } = new JobInputType(UriFolderValue); - /// mltable. + /// + /// mltable + /// Serialized Name: JobInputType.mltable + /// public static JobInputType Mltable { get; } = new JobInputType(MltableValue); - /// custom_model. + /// + /// custom_model + /// Serialized Name: JobInputType.custom_model + /// public static JobInputType CustomModel { get; } = new JobInputType(CustomModelValue); - /// mlflow_model. + /// + /// mlflow_model + /// Serialized Name: JobInputType.mlflow_model + /// public static JobInputType MlflowModel { get; } = new JobInputType(MlflowModelValue); - /// triton_model. + /// + /// triton_model + /// Serialized Name: JobInputType.triton_model + /// public static JobInputType TritonModel { get; } = new JobInputType(TritonModelValue); /// Determines if two values are the same. public static bool operator ==(JobInputType left, JobInputType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimits.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimits.Serialization.cs deleted file mode 100644 index 15001a848cf0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimits.Serialization.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JobLimits : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("jobLimitsType"); - writer.WriteStringValue(JobLimitsType.ToString()); - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - writer.WriteEndObject(); - } - - internal static JobLimits DeserializeJobLimits(JsonElement element) - { - if (element.TryGetProperty("jobLimitsType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Sweep": return SweepJobLimits.DeserializeSweepJobLimits(element); - case "Command": return CommandJobLimits.DeserializeCommandJobLimits(element); - } - } - return UnknownJobLimits.DeserializeUnknownJobLimits(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimits.cs deleted file mode 100644 index c4c130a9bf45..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimits.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// The JobLimits. - /// Please note is the base class. According to the scenario, a derived class 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 JobLimits - { - /// Initializes a new instance of JobLimits. - protected JobLimits() - { - } - - /// Initializes a new instance of JobLimits. - /// [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. - internal JobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout) - { - JobLimitsType = jobLimitsType; - Timeout = timeout; - } - - /// [Required] JobLimit type. - internal JobLimitsType JobLimitsType { get; set; } - /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. - public TimeSpan? Timeout { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimitsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimitsType.cs index a949929cab34..69e102b6a375 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimitsType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobLimitsType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The JobLimitsType. + /// + /// The JobLimitsType. + /// Serialized Name: JobLimitsType + /// internal readonly partial struct JobLimitsType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public JobLimitsType(string value) private const string CommandValue = "Command"; private const string SweepValue = "Sweep"; - /// Command. + /// + /// Command + /// Serialized Name: JobLimitsType.Command + /// public static JobLimitsType Command { get; } = new JobLimitsType(CommandValue); - /// Sweep. + /// + /// Sweep + /// Serialized Name: JobLimitsType.Sweep + /// public static JobLimitsType Sweep { get; } = new JobLimitsType(SweepValue); /// Determines if two values are the same. public static bool operator ==(JobLimitsType left, JobLimitsType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutput.Serialization.cs deleted file mode 100644 index fe68d2f06eb7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutput.Serialization.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static JobOutput DeserializeJobOutput(JsonElement element) - { - if (element.TryGetProperty("jobOutputType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "custom_model": return CustomModelJobOutput.DeserializeCustomModelJobOutput(element); - case "mlflow_model": return MLFlowModelJobOutput.DeserializeMLFlowModelJobOutput(element); - case "mltable": return MLTableJobOutput.DeserializeMLTableJobOutput(element); - case "triton_model": return TritonModelJobOutput.DeserializeTritonModelJobOutput(element); - case "uri_file": return UriFileJobOutput.DeserializeUriFileJobOutput(element); - case "uri_folder": return UriFolderJobOutput.DeserializeUriFolderJobOutput(element); - } - } - return UnknownJobOutput.DeserializeUnknownJobOutput(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutput.cs deleted file mode 100644 index ea923c7fa81b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutput.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Job output definition container information on where to find job output/logs. - /// Please note is the base class. According to the scenario, a derived class 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 JobOutput - { - /// Initializes a new instance of JobOutput. - protected JobOutput() - { - } - - /// Initializes a new instance of JobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - internal JobOutput(string description, JobOutputType jobOutputType) - { - Description = description; - JobOutputType = jobOutputType; - } - - /// Description for the output. - public string Description { get; set; } - /// [Required] Specifies the type of job. - internal JobOutputType JobOutputType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutputType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutputType.cs index 16f907b51cfe..a8d394f7fed9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutputType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobOutputType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the Job Output Type. + /// + /// Enum to determine the Job Output Type. + /// Serialized Name: JobOutputType + /// internal readonly partial struct JobOutputType : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public JobOutputType(string value) private const string MlflowModelValue = "mlflow_model"; private const string TritonModelValue = "triton_model"; - /// uri_file. + /// + /// uri_file + /// Serialized Name: JobOutputType.uri_file + /// public static JobOutputType UriFile { get; } = new JobOutputType(UriFileValue); - /// uri_folder. + /// + /// uri_folder + /// Serialized Name: JobOutputType.uri_folder + /// public static JobOutputType UriFolder { get; } = new JobOutputType(UriFolderValue); - /// mltable. + /// + /// mltable + /// Serialized Name: JobOutputType.mltable + /// public static JobOutputType Mltable { get; } = new JobOutputType(MltableValue); - /// custom_model. + /// + /// custom_model + /// Serialized Name: JobOutputType.custom_model + /// public static JobOutputType CustomModel { get; } = new JobOutputType(CustomModelValue); - /// mlflow_model. + /// + /// mlflow_model + /// Serialized Name: JobOutputType.mlflow_model + /// public static JobOutputType MlflowModel { get; } = new JobOutputType(MlflowModelValue); - /// triton_model. + /// + /// triton_model + /// Serialized Name: JobOutputType.triton_model + /// public static JobOutputType TritonModel { get; } = new JobOutputType(TritonModelValue); /// Determines if two values are the same. public static bool operator ==(JobOutputType left, JobOutputType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResourceConfiguration.Serialization.cs deleted file mode 100644 index aea0692e6ce9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResourceConfiguration.Serialization.cs +++ /dev/null @@ -1,142 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JobResourceConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(DockerArgs)) - { - if (DockerArgs != null) - { - writer.WritePropertyName("dockerArgs"); - writer.WriteStringValue(DockerArgs); - } - else - { - writer.WriteNull("dockerArgs"); - } - } - if (Optional.IsDefined(ShmSize)) - { - writer.WritePropertyName("shmSize"); - writer.WriteStringValue(ShmSize); - } - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"); - writer.WriteNumberValue(InstanceCount.Value); - } - if (Optional.IsDefined(InstanceType)) - { - if (InstanceType != null) - { - writer.WritePropertyName("instanceType"); - writer.WriteStringValue(InstanceType); - } - else - { - writer.WriteNull("instanceType"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static JobResourceConfiguration DeserializeJobResourceConfiguration(JsonElement element) - { - Optional dockerArgs = default; - Optional shmSize = default; - Optional instanceCount = default; - Optional instanceType = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dockerArgs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - dockerArgs = null; - continue; - } - dockerArgs = property.Value.GetString(); - continue; - } - if (property.NameEquals("shmSize")) - { - shmSize = property.Value.GetString(); - continue; - } - if (property.NameEquals("instanceCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - instanceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("instanceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instanceType = null; - continue; - } - instanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); - } - properties = dictionary; - continue; - } - } - return new JobResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties), dockerArgs.Value, shmSize.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResourceConfiguration.cs deleted file mode 100644 index 959dac0fed22..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobResourceConfiguration.cs +++ /dev/null @@ -1,38 +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 JobResourceConfiguration. - public partial class JobResourceConfiguration : ResourceConfiguration - { - /// Initializes a new instance of JobResourceConfiguration. - public JobResourceConfiguration() - { - } - - /// Initializes a new instance of JobResourceConfiguration. - /// Optional number of instances or nodes used by the compute target. - /// Optional type of VM used as supported by the compute target. - /// Additional properties bag. - /// 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 JobResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties, string dockerArgs, string shmSize) : base(instanceCount, instanceType, properties) - { - DockerArgs = dockerArgs; - ShmSize = shmSize; - } - - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobScheduleAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobScheduleAction.Serialization.cs deleted file mode 100644 index 469a0512ba58..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobScheduleAction.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JobScheduleAction : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("jobDefinition"); - writer.WriteObjectValue(JobDefinition); - writer.WritePropertyName("actionType"); - writer.WriteStringValue(ActionType.ToString()); - writer.WriteEndObject(); - } - - internal static JobScheduleAction DeserializeJobScheduleAction(JsonElement element) - { - MachineLearningJobProperties jobDefinition = default; - ScheduleActionType actionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("jobDefinition")) - { - jobDefinition = MachineLearningJobProperties.DeserializeMachineLearningJobProperties(property.Value); - continue; - } - if (property.NameEquals("actionType")) - { - actionType = new ScheduleActionType(property.Value.GetString()); - continue; - } - } - return new JobScheduleAction(actionType, jobDefinition); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobScheduleAction.cs deleted file mode 100644 index 2fcd3534ca1c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobScheduleAction.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The JobScheduleAction. - public partial class JobScheduleAction : ScheduleActionBase - { - /// Initializes a new instance of JobScheduleAction. - /// - /// [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 . - /// - /// is null. - public JobScheduleAction(MachineLearningJobProperties jobDefinition) - { - Argument.AssertNotNull(jobDefinition, nameof(jobDefinition)); - - JobDefinition = jobDefinition; - ActionType = ScheduleActionType.CreateJob; - } - - /// Initializes a new instance of JobScheduleAction. - /// [Required] Specifies the action type of the schedule. - /// - /// [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 . - /// - internal JobScheduleAction(ScheduleActionType actionType, MachineLearningJobProperties jobDefinition) : base(actionType) - { - JobDefinition = jobDefinition; - ActionType = actionType; - } - - /// - /// [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 . - /// - public MachineLearningJobProperties JobDefinition { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobService.Serialization.cs deleted file mode 100644 index b660e3e2831f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobService.Serialization.cs +++ /dev/null @@ -1,162 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class JobService : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Endpoint)) - { - if (Endpoint != null) - { - writer.WritePropertyName("endpoint"); - writer.WriteStringValue(Endpoint); - } - else - { - writer.WriteNull("endpoint"); - } - } - if (Optional.IsDefined(JobServiceType)) - { - if (JobServiceType != null) - { - writer.WritePropertyName("jobServiceType"); - writer.WriteStringValue(JobServiceType); - } - else - { - writer.WriteNull("jobServiceType"); - } - } - if (Optional.IsDefined(Port)) - { - if (Port != null) - { - writer.WritePropertyName("port"); - writer.WriteNumberValue(Port.Value); - } - else - { - writer.WriteNull("port"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static JobService DeserializeJobService(JsonElement element) - { - Optional endpoint = default; - Optional errorMessage = default; - Optional jobServiceType = default; - Optional port = default; - Optional> properties = default; - Optional status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("endpoint")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - endpoint = null; - continue; - } - endpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("errorMessage")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - errorMessage = null; - continue; - } - errorMessage = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobServiceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - jobServiceType = null; - continue; - } - jobServiceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("port")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - port = null; - continue; - } - port = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - status = null; - continue; - } - status = property.Value.GetString(); - continue; - } - } - return new JobService(endpoint.Value, errorMessage.Value, jobServiceType.Value, Optional.ToNullable(port), Optional.ToDictionary(properties), status.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobService.cs deleted file mode 100644 index 65d01e4c45fc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobService.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Job endpoint definition. - public partial class JobService - { - /// Initializes a new instance of JobService. - public JobService() - { - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of JobService. - /// Url for endpoint. - /// Any error in the service. - /// Endpoint type. - /// Port for endpoint. - /// Additional properties to set on the endpoint. - /// Status of endpoint. - internal JobService(string endpoint, string errorMessage, string jobServiceType, int? port, IDictionary properties, string status) - { - Endpoint = endpoint; - ErrorMessage = errorMessage; - JobServiceType = jobServiceType; - Port = port; - Properties = properties; - Status = status; - } - - /// Url for endpoint. - public string Endpoint { get; set; } - /// Any error in the service. - public string ErrorMessage { get; } - /// Endpoint type. - public string JobServiceType { 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/JobStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatus.cs deleted file mode 100644 index 223a1887b3ca..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobStatus.cs +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The status of a job. - public readonly partial struct JobStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public JobStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotStartedValue = "NotStarted"; - private const string StartingValue = "Starting"; - private const string ProvisioningValue = "Provisioning"; - private const string PreparingValue = "Preparing"; - private const string QueuedValue = "Queued"; - private const string RunningValue = "Running"; - private const string FinalizingValue = "Finalizing"; - private const string CancelRequestedValue = "CancelRequested"; - private const string CompletedValue = "Completed"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - private const string NotRespondingValue = "NotResponding"; - private const string PausedValue = "Paused"; - private const string UnknownValue = "Unknown"; - - /// Run hasn't started yet. - public static JobStatus NotStarted { get; } = new JobStatus(NotStartedValue); - /// Run has started. The user has a run ID. - public static JobStatus Starting { get; } = new JobStatus(StartingValue); - /// (Not used currently) It will be used if ES is creating the compute target. - public static JobStatus Provisioning { get; } = new JobStatus(ProvisioningValue); - /// The run environment is being prepared. - public static JobStatus Preparing { get; } = new JobStatus(PreparingValue); - /// The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready. - public static JobStatus Queued { get; } = new JobStatus(QueuedValue); - /// The job started to run in the compute target. - public static JobStatus Running { get; } = new JobStatus(RunningValue); - /// Job is completed in the target. It is in output collection state now. - public static JobStatus Finalizing { get; } = new JobStatus(FinalizingValue); - /// Cancellation has been requested for the job. - public static JobStatus CancelRequested { get; } = new JobStatus(CancelRequestedValue); - /// Job completed successfully. This reflects that both the job itself and output collection states completed successfully. - public static JobStatus Completed { get; } = new JobStatus(CompletedValue); - /// Job failed. - public static JobStatus Failed { get; } = new JobStatus(FailedValue); - /// Following cancellation request, the job is now successfully canceled. - public static JobStatus Canceled { get; } = new JobStatus(CanceledValue); - /// - /// When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. - /// NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. - /// - public static JobStatus NotResponding { get; } = new JobStatus(NotRespondingValue); - /// The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. - public static JobStatus Paused { get; } = new JobStatus(PausedValue); - /// Default job status if not mapped to all other statuses. - public static JobStatus Unknown { get; } = new JobStatus(UnknownValue); - /// Determines if two values are the same. - public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator JobStatus(string value) => new JobStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is JobStatus other && Equals(other); - /// - public bool Equals(JobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} 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 1c2153f63efc..8f4568b41631 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/JobType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the type of job. + /// + /// Enum to determine the type of job. + /// Serialized Name: JobType + /// internal readonly partial struct JobType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public JobType(string value) private const string SweepValue = "Sweep"; private const string PipelineValue = "Pipeline"; - /// AutoML. + /// + /// AutoML + /// Serialized Name: JobType.AutoML + /// public static JobType AutoML { get; } = new JobType(AutoMLValue); - /// Command. + /// + /// Command + /// Serialized Name: JobType.Command + /// public static JobType Command { get; } = new JobType(CommandValue); - /// Sweep. + /// + /// Sweep + /// Serialized Name: JobType.Sweep + /// public static JobType Sweep { get; } = new JobType(SweepValue); - /// Pipeline. + /// + /// Pipeline + /// Serialized Name: JobType.Pipeline + /// public static JobType Pipeline { get; } = new JobType(PipelineValue); /// Determines if two values are the same. public static bool operator ==(JobType left, JobType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KeyType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KeyType.cs deleted file mode 100644 index c85afccafac0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KeyType.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 KeyType. - public readonly partial struct KeyType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public KeyType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PrimaryValue = "Primary"; - private const string SecondaryValue = "Secondary"; - - /// Primary. - public static KeyType Primary { get; } = new KeyType(PrimaryValue); - /// Secondary. - public static KeyType Secondary { get; } = new KeyType(SecondaryValue); - /// Determines if two values are the same. - public static bool operator ==(KeyType left, KeyType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(KeyType left, KeyType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator KeyType(string value) => new KeyType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is KeyType other && Equals(other); - /// - public bool Equals(KeyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesCompute.Serialization.cs deleted file mode 100644 index 70fd4b795d9b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class KubernetesCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static KubernetesCompute DeserializeKubernetesCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = KubernetesProperties.DeserializeKubernetesProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new KubernetesCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesCompute.cs deleted file mode 100644 index 7a8b0886e84a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesCompute.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 -{ - /// A Machine Learning compute based on Kubernetes Compute. - public partial class KubernetesCompute : Compute - { - /// Initializes a new instance of KubernetesCompute. - public KubernetesCompute() - { - ComputeType = ComputeType.Kubernetes; - } - - /// Initializes a new instance of KubernetesCompute. - /// 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. - /// Properties of Kubernetes. - internal KubernetesCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, KubernetesProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// Properties of Kubernetes. - public KubernetesProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesOnlineDeployment.Serialization.cs deleted file mode 100644 index dff5d4656fc8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesOnlineDeployment.Serialization.cs +++ /dev/null @@ -1,416 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class KubernetesOnlineDeployment : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ContainerResourceRequirements)) - { - if (ContainerResourceRequirements != null) - { - writer.WritePropertyName("containerResourceRequirements"); - writer.WriteObjectValue(ContainerResourceRequirements); - } - else - { - writer.WriteNull("containerResourceRequirements"); - } - } - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(EgressPublicNetworkAccess)) - { - writer.WritePropertyName("egressPublicNetworkAccess"); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); - } - writer.WritePropertyName("endpointComputeType"); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) - { - if (InstanceType != null) - { - writer.WritePropertyName("instanceType"); - writer.WriteStringValue(InstanceType); - } - else - { - writer.WriteNull("instanceType"); - } - } - if (Optional.IsDefined(LivenessProbe)) - { - if (LivenessProbe != null) - { - writer.WritePropertyName("livenessProbe"); - writer.WriteObjectValue(LivenessProbe); - } - else - { - writer.WriteNull("livenessProbe"); - } - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"); - writer.WriteStringValue(Model); - } - else - { - writer.WriteNull("model"); - } - } - if (Optional.IsDefined(ModelMountPath)) - { - if (ModelMountPath != null) - { - writer.WritePropertyName("modelMountPath"); - writer.WriteStringValue(ModelMountPath); - } - else - { - writer.WriteNull("modelMountPath"); - } - } - if (Optional.IsDefined(ReadinessProbe)) - { - if (ReadinessProbe != null) - { - writer.WritePropertyName("readinessProbe"); - writer.WriteObjectValue(ReadinessProbe); - } - else - { - writer.WriteNull("readinessProbe"); - } - } - if (Optional.IsDefined(RequestSettings)) - { - if (RequestSettings != null) - { - writer.WritePropertyName("requestSettings"); - writer.WriteObjectValue(RequestSettings); - } - else - { - writer.WriteNull("requestSettings"); - } - } - if (Optional.IsDefined(ScaleSettings)) - { - if (ScaleSettings != null) - { - writer.WritePropertyName("scaleSettings"); - writer.WriteObjectValue(ScaleSettings); - } - else - { - writer.WriteNull("scaleSettings"); - } - } - if (Optional.IsDefined(CodeConfiguration)) - { - if (CodeConfiguration != null) - { - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - } - else - { - writer.WriteNull("codeConfiguration"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(EnvironmentId)) - { - if (EnvironmentId != null) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - else - { - writer.WriteNull("environmentId"); - } - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - if (EnvironmentVariables != null) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("environmentVariables"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static KubernetesOnlineDeployment DeserializeKubernetesOnlineDeployment(JsonElement element) - { - Optional containerResourceRequirements = default; - Optional appInsightsEnabled = default; - Optional egressPublicNetworkAccess = default; - EndpointComputeType endpointComputeType = default; - Optional instanceType = default; - Optional livenessProbe = default; - Optional model = default; - Optional modelMountPath = default; - Optional provisioningState = default; - Optional readinessProbe = default; - Optional requestSettings = default; - Optional scaleSettings = default; - Optional codeConfiguration = default; - Optional description = default; - Optional environmentId = default; - Optional> environmentVariables = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("containerResourceRequirements")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - containerResourceRequirements = null; - continue; - } - containerResourceRequirements = ContainerResourceRequirements.DeserializeContainerResourceRequirements(property.Value); - continue; - } - if (property.NameEquals("appInsightsEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("egressPublicNetworkAccess")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - egressPublicNetworkAccess = new EgressPublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointComputeType")) - { - endpointComputeType = new EndpointComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("instanceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instanceType = null; - continue; - } - instanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("livenessProbe")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - livenessProbe = null; - continue; - } - livenessProbe = ProbeSettings.DeserializeProbeSettings(property.Value); - continue; - } - if (property.NameEquals("model")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelMountPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelMountPath = null; - continue; - } - modelMountPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new DeploymentProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("readinessProbe")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - readinessProbe = null; - continue; - } - readinessProbe = ProbeSettings.DeserializeProbeSettings(property.Value); - continue; - } - if (property.NameEquals("requestSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - requestSettings = null; - continue; - } - requestSettings = OnlineRequestSettings.DeserializeOnlineRequestSettings(property.Value); - continue; - } - if (property.NameEquals("scaleSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - scaleSettings = null; - continue; - } - scaleSettings = OnlineScaleSettings.DeserializeOnlineScaleSettings(property.Value); - continue; - } - if (property.NameEquals("codeConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeConfiguration = null; - continue; - } - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentId = null; - continue; - } - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentVariables = 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, property0.Value.GetString()); - } - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - } - return new KubernetesOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value, containerResourceRequirements.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesOnlineDeployment.cs deleted file mode 100644 index ea628b65f0d2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesOnlineDeployment.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Properties specific to a KubernetesOnlineDeployment. - public partial class KubernetesOnlineDeployment : OnlineDeploymentProperties - { - /// Initializes a new instance of KubernetesOnlineDeployment. - public KubernetesOnlineDeployment() - { - EndpointComputeType = EndpointComputeType.Kubernetes; - } - - /// Initializes a new instance of KubernetesOnlineDeployment. - /// 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. - /// 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 . - /// - /// The resource requirements for the container (cpu and memory). - internal KubernetesOnlineDeployment(CodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, EgressPublicNetworkAccessType? egressPublicNetworkAccess, EndpointComputeType endpointComputeType, string instanceType, ProbeSettings livenessProbe, string model, string modelMountPath, DeploymentProvisioningState? provisioningState, ProbeSettings readinessProbe, OnlineRequestSettings requestSettings, OnlineScaleSettings scaleSettings, ContainerResourceRequirements containerResourceRequirements) : base(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) - { - ContainerResourceRequirements = containerResourceRequirements; - EndpointComputeType = endpointComputeType; - } - - /// The resource requirements for the container (cpu and memory). - public ContainerResourceRequirements ContainerResourceRequirements { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesProperties.Serialization.cs deleted file mode 100644 index 98ac158285f9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesProperties.Serialization.cs +++ /dev/null @@ -1,170 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class KubernetesProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(RelayConnectionString)) - { - if (RelayConnectionString != null) - { - writer.WritePropertyName("relayConnectionString"); - writer.WriteStringValue(RelayConnectionString); - } - else - { - writer.WriteNull("relayConnectionString"); - } - } - if (Optional.IsDefined(ServiceBusConnectionString)) - { - if (ServiceBusConnectionString != null) - { - writer.WritePropertyName("serviceBusConnectionString"); - writer.WriteStringValue(ServiceBusConnectionString); - } - else - { - writer.WriteNull("serviceBusConnectionString"); - } - } - if (Optional.IsDefined(ExtensionPrincipalId)) - { - if (ExtensionPrincipalId != null) - { - writer.WritePropertyName("extensionPrincipalId"); - writer.WriteStringValue(ExtensionPrincipalId); - } - else - { - writer.WriteNull("extensionPrincipalId"); - } - } - if (Optional.IsDefined(ExtensionInstanceReleaseTrain)) - { - writer.WritePropertyName("extensionInstanceReleaseTrain"); - writer.WriteStringValue(ExtensionInstanceReleaseTrain); - } - if (Optional.IsDefined(VcName)) - { - writer.WritePropertyName("vcName"); - writer.WriteStringValue(VcName); - } - if (Optional.IsDefined(Namespace)) - { - writer.WritePropertyName("namespace"); - writer.WriteStringValue(Namespace); - } - if (Optional.IsDefined(DefaultInstanceType)) - { - writer.WritePropertyName("defaultInstanceType"); - writer.WriteStringValue(DefaultInstanceType); - } - if (Optional.IsCollectionDefined(InstanceTypes)) - { - writer.WritePropertyName("instanceTypes"); - writer.WriteStartObject(); - foreach (var item in InstanceTypes) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static KubernetesProperties DeserializeKubernetesProperties(JsonElement element) - { - Optional relayConnectionString = default; - Optional serviceBusConnectionString = default; - Optional extensionPrincipalId = default; - Optional extensionInstanceReleaseTrain = default; - Optional vcName = default; - Optional @namespace = default; - Optional defaultInstanceType = default; - Optional> instanceTypes = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("relayConnectionString")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - relayConnectionString = null; - continue; - } - relayConnectionString = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceBusConnectionString")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - serviceBusConnectionString = null; - continue; - } - serviceBusConnectionString = property.Value.GetString(); - continue; - } - if (property.NameEquals("extensionPrincipalId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - extensionPrincipalId = null; - continue; - } - extensionPrincipalId = property.Value.GetString(); - continue; - } - if (property.NameEquals("extensionInstanceReleaseTrain")) - { - extensionInstanceReleaseTrain = property.Value.GetString(); - continue; - } - if (property.NameEquals("vcName")) - { - vcName = property.Value.GetString(); - continue; - } - if (property.NameEquals("namespace")) - { - @namespace = property.Value.GetString(); - continue; - } - if (property.NameEquals("defaultInstanceType")) - { - defaultInstanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("instanceTypes")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, InstanceTypeSchema.DeserializeInstanceTypeSchema(property0.Value)); - } - instanceTypes = dictionary; - continue; - } - } - return new KubernetesProperties(relayConnectionString.Value, serviceBusConnectionString.Value, extensionPrincipalId.Value, extensionInstanceReleaseTrain.Value, vcName.Value, @namespace.Value, defaultInstanceType.Value, Optional.ToDictionary(instanceTypes)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesProperties.cs deleted file mode 100644 index 24541e55aa91..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/KubernetesProperties.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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Kubernetes properties. - public partial class KubernetesProperties - { - /// Initializes a new instance of KubernetesProperties. - public KubernetesProperties() - { - InstanceTypes = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of KubernetesProperties. - /// Relay connection string. - /// ServiceBus connection string. - /// Extension principal-id. - /// Extension instance release train. - /// VC name. - /// Compute namespace. - /// Default instance type. - /// Instance Type Schema. - internal KubernetesProperties(string relayConnectionString, string serviceBusConnectionString, string extensionPrincipalId, string extensionInstanceReleaseTrain, string vcName, string @namespace, string defaultInstanceType, IDictionary instanceTypes) - { - RelayConnectionString = relayConnectionString; - ServiceBusConnectionString = serviceBusConnectionString; - ExtensionPrincipalId = extensionPrincipalId; - ExtensionInstanceReleaseTrain = extensionInstanceReleaseTrain; - VcName = vcName; - Namespace = @namespace; - DefaultInstanceType = defaultInstanceType; - InstanceTypes = instanceTypes; - } - - /// Relay connection string. - public string RelayConnectionString { get; set; } - /// ServiceBus connection string. - public string ServiceBusConnectionString { get; set; } - /// Extension principal-id. - public string ExtensionPrincipalId { get; set; } - /// Extension instance release train. - public string ExtensionInstanceReleaseTrain { get; set; } - /// VC name. - public string VcName { get; set; } - /// Compute namespace. - public string Namespace { get; set; } - /// Default instance type. - public string DefaultInstanceType { get; set; } - /// Instance Type Schema. - public IDictionary InstanceTypes { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LearningRateScheduler.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LearningRateScheduler.cs index 198e478344a4..037e785edc15 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LearningRateScheduler.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LearningRateScheduler.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Learning rate scheduler enum. + /// + /// Learning rate scheduler enum. + /// Serialized Name: LearningRateScheduler + /// public readonly partial struct LearningRateScheduler : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public LearningRateScheduler(string value) private const string WarmupCosineValue = "WarmupCosine"; private const string StepValue = "Step"; - /// No learning rate scheduler selected. + /// + /// No learning rate scheduler selected. + /// Serialized Name: LearningRateScheduler.None + /// public static LearningRateScheduler None { get; } = new LearningRateScheduler(NoneValue); - /// Cosine Annealing With Warmup. + /// + /// Cosine Annealing With Warmup. + /// Serialized Name: LearningRateScheduler.WarmupCosine + /// public static LearningRateScheduler WarmupCosine { get; } = new LearningRateScheduler(WarmupCosineValue); - /// Step learning rate scheduler. + /// + /// Step learning rate scheduler. + /// Serialized Name: LearningRateScheduler.Step + /// public static LearningRateScheduler Step { get; } = new LearningRateScheduler(StepValue); /// Determines if two values are the same. public static bool operator ==(LearningRateScheduler left, LearningRateScheduler right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs index 5650400c67a1..7504897f5c55 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.Serialization.cs @@ -15,7 +15,7 @@ internal partial class ListAmlUserFeatureResult { internal static ListAmlUserFeatureResult DeserializeListAmlUserFeatureResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -26,10 +26,10 @@ internal static ListAmlUserFeatureResult DeserializeListAmlUserFeatureResult(Jso property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(AmlUserFeature.DeserializeAmlUserFeature(item)); + array.Add(MachineLearningUserFeature.DeserializeMachineLearningUserFeature(item)); } value = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.cs index 9d49fc18955f..0b8fd8e0c3cd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListAmlUserFeatureResult.cs @@ -10,27 +10,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The List Aml user feature operation response. + /// + /// The List Aml user feature operation response. + /// Serialized Name: ListAmlUserFeatureResult + /// internal partial class ListAmlUserFeatureResult { /// Initializes a new instance of ListAmlUserFeatureResult. internal ListAmlUserFeatureResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ListAmlUserFeatureResult. - /// The list of AML user facing features. - /// The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information. - internal ListAmlUserFeatureResult(IReadOnlyList value, string nextLink) + /// + /// The list of AML user facing features. + /// Serialized Name: ListAmlUserFeatureResult.value + /// + /// + /// The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information. + /// Serialized Name: ListAmlUserFeatureResult.nextLink + /// + internal ListAmlUserFeatureResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// The list of AML user facing features. - public IReadOnlyList Value { get; } - /// The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information. + /// + /// The list of AML user facing features. + /// Serialized Name: ListAmlUserFeatureResult.value + /// + public IReadOnlyList Value { get; } + /// + /// The URI to fetch the next page of AML user features information. Call ListNext() with this to fetch the next page of AML user features information. + /// Serialized Name: ListAmlUserFeatureResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListNotebookKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListNotebookKeysResult.Serialization.cs deleted file mode 100644 index 7589f76a7654..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListNotebookKeysResult.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ListNotebookKeysResult - { - internal static ListNotebookKeysResult DeserializeListNotebookKeysResult(JsonElement element) - { - Optional primaryAccessKey = default; - Optional secondaryAccessKey = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("primaryAccessKey")) - { - primaryAccessKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("secondaryAccessKey")) - { - secondaryAccessKey = property.Value.GetString(); - continue; - } - } - return new ListNotebookKeysResult(primaryAccessKey.Value, secondaryAccessKey.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListNotebookKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListNotebookKeysResult.cs deleted file mode 100644 index 4fa1dc908598..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListNotebookKeysResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ListNotebookKeysResult. - public partial class ListNotebookKeysResult - { - /// Initializes a new instance of ListNotebookKeysResult. - internal ListNotebookKeysResult() - { - } - - /// Initializes a new instance of ListNotebookKeysResult. - /// - /// - internal ListNotebookKeysResult(string primaryAccessKey, string secondaryAccessKey) - { - PrimaryAccessKey = primaryAccessKey; - SecondaryAccessKey = secondaryAccessKey; - } - - /// Gets the primary access key. - public string PrimaryAccessKey { get; } - /// Gets the secondary access key. - public string SecondaryAccessKey { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListStorageAccountKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListStorageAccountKeysResult.Serialization.cs deleted file mode 100644 index 3f7a16ac9cb7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListStorageAccountKeysResult.Serialization.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ListStorageAccountKeysResult - { - internal static ListStorageAccountKeysResult DeserializeListStorageAccountKeysResult(JsonElement element) - { - Optional userStorageKey = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userStorageKey")) - { - userStorageKey = property.Value.GetString(); - continue; - } - } - return new ListStorageAccountKeysResult(userStorageKey.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListStorageAccountKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListStorageAccountKeysResult.cs deleted file mode 100644 index 1c3cef692958..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListStorageAccountKeysResult.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ListStorageAccountKeysResult. - public partial class ListStorageAccountKeysResult - { - /// Initializes a new instance of ListStorageAccountKeysResult. - internal ListStorageAccountKeysResult() - { - } - - /// Initializes a new instance of ListStorageAccountKeysResult. - /// - internal ListStorageAccountKeysResult(string userStorageKey) - { - UserStorageKey = userStorageKey; - } - - /// Gets the user storage key. - public string UserStorageKey { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListUsagesResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListUsagesResult.cs index dc5320117284..3674aa85f49e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListUsagesResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListUsagesResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The List Usages operation response. + /// + /// The List Usages operation response. + /// Serialized Name: ListUsagesResult + /// internal partial class ListUsagesResult { /// Initializes a new instance of ListUsagesResult. @@ -20,17 +23,29 @@ internal ListUsagesResult() } /// Initializes a new instance of ListUsagesResult. - /// The list of AML resource usages. - /// The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information. + /// + /// The list of AML resource usages. + /// Serialized Name: ListUsagesResult.value + /// + /// + /// The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information. + /// Serialized Name: ListUsagesResult.nextLink + /// internal ListUsagesResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// The list of AML resource usages. + /// + /// The list of AML resource usages. + /// Serialized Name: ListUsagesResult.value + /// public IReadOnlyList Value { get; } - /// The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information. + /// + /// The URI to fetch the next page of AML resource usage information. Call ListNext() with this to fetch the next page of AML resource usage information. + /// Serialized Name: ListUsagesResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListViewType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListViewType.cs deleted file mode 100644 index 3bb27ae7cdbf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListViewType.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 ListViewType. - public readonly partial struct ListViewType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ListViewType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ActiveOnlyValue = "ActiveOnly"; - private const string ArchivedOnlyValue = "ArchivedOnly"; - private const string AllValue = "All"; - - /// ActiveOnly. - public static ListViewType ActiveOnly { get; } = new ListViewType(ActiveOnlyValue); - /// ArchivedOnly. - public static ListViewType ArchivedOnly { get; } = new ListViewType(ArchivedOnlyValue); - /// All. - public static ListViewType All { get; } = new ListViewType(AllValue); - /// Determines if two values are the same. - public static bool operator ==(ListViewType left, ListViewType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ListViewType left, ListViewType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ListViewType(string value) => new ListViewType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ListViewType other && Equals(other); - /// - public bool Equals(ListViewType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs deleted file mode 100644 index ffe0782cfcdb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceKeysResult.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ListWorkspaceKeysResult - { - internal static ListWorkspaceKeysResult DeserializeListWorkspaceKeysResult(JsonElement element) - { - Optional userStorageKey = default; - Optional userStorageResourceId = default; - Optional appInsightsInstrumentationKey = default; - Optional containerRegistryCredentials = default; - Optional notebookAccessKeys = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userStorageKey")) - { - userStorageKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("userStorageResourceId")) - { - userStorageResourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("appInsightsInstrumentationKey")) - { - appInsightsInstrumentationKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("containerRegistryCredentials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - containerRegistryCredentials = RegistryListCredentialsResult.DeserializeRegistryListCredentialsResult(property.Value); - continue; - } - if (property.NameEquals("notebookAccessKeys")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - notebookAccessKeys = ListNotebookKeysResult.DeserializeListNotebookKeysResult(property.Value); - continue; - } - } - return new ListWorkspaceKeysResult(userStorageKey.Value, userStorageResourceId.Value, appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value, notebookAccessKeys.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceKeysResult.cs deleted file mode 100644 index 1a2214f43366..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceKeysResult.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ListWorkspaceKeysResult. - public partial class ListWorkspaceKeysResult - { - /// Initializes a new instance of ListWorkspaceKeysResult. - internal ListWorkspaceKeysResult() - { - } - - /// Initializes a new instance of ListWorkspaceKeysResult. - /// - /// - /// - /// - /// - internal ListWorkspaceKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, RegistryListCredentialsResult containerRegistryCredentials, ListNotebookKeysResult notebookAccessKeys) - { - UserStorageKey = userStorageKey; - UserStorageResourceId = userStorageResourceId; - AppInsightsInstrumentationKey = appInsightsInstrumentationKey; - ContainerRegistryCredentials = containerRegistryCredentials; - NotebookAccessKeys = notebookAccessKeys; - } - - /// 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 RegistryListCredentialsResult ContainerRegistryCredentials { get; } - /// Gets the notebook access keys. - public ListNotebookKeysResult NotebookAccessKeys { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs index 7798be90fa4d..db4810d351c0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.Serialization.cs @@ -15,7 +15,7 @@ internal partial class ListWorkspaceQuotas { internal static ListWorkspaceQuotas DeserializeListWorkspaceQuotas(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -26,10 +26,10 @@ internal static ListWorkspaceQuotas DeserializeListWorkspaceQuotas(JsonElement e property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ResourceQuota.DeserializeResourceQuota(item)); + array.Add(MachineLearningResourceQuota.DeserializeMachineLearningResourceQuota(item)); } value = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.cs index af8e85bb495b..88482094ca02 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ListWorkspaceQuotas.cs @@ -10,27 +10,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The List WorkspaceQuotasByVMFamily operation response. + /// + /// The List WorkspaceQuotasByVMFamily operation response. + /// Serialized Name: ListWorkspaceQuotas + /// internal partial class ListWorkspaceQuotas { /// Initializes a new instance of ListWorkspaceQuotas. internal ListWorkspaceQuotas() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ListWorkspaceQuotas. - /// The list of Workspace Quotas by VM Family. - /// The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information. - internal ListWorkspaceQuotas(IReadOnlyList value, string nextLink) + /// + /// The list of Workspace Quotas by VM Family + /// Serialized Name: ListWorkspaceQuotas.value + /// + /// + /// The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information. + /// Serialized Name: ListWorkspaceQuotas.nextLink + /// + internal ListWorkspaceQuotas(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// The list of Workspace Quotas by VM Family. - public IReadOnlyList Value { get; } - /// The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information. + /// + /// The list of Workspace Quotas by VM Family + /// Serialized Name: ListWorkspaceQuotas.value + /// + public IReadOnlyList Value { get; } + /// + /// The URI to fetch the next page of workspace quota information by VM Family. Call ListNext() with this to fetch the next page of Workspace Quota information. + /// Serialized Name: ListWorkspaceQuotas.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LiteralJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LiteralJobInput.Serialization.cs deleted file mode 100644 index b78f7fd55954..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LiteralJobInput.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class LiteralJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static LiteralJobInput DeserializeLiteralJobInput(JsonElement element) - { - string value = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new LiteralJobInput(description.Value, jobInputType, value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LiteralJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LiteralJobInput.cs deleted file mode 100644 index 5c537a946c32..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LiteralJobInput.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Literal input type. - public partial class LiteralJobInput : JobInput - { - /// Initializes a new instance of LiteralJobInput. - /// [Required] Literal value for the input. - /// is null. - public LiteralJobInput(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value; - JobInputType = JobInputType.Literal; - } - - /// Initializes a new instance of LiteralJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// [Required] Literal value for the input. - internal LiteralJobInput(string description, JobInputType jobInputType, string value) : base(description, jobInputType) - { - Value = value; - JobInputType = jobInputType; - } - - /// [Required] Literal value for the input. - public string Value { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LoadBalancerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LoadBalancerType.cs deleted file mode 100644 index a63df602f965..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LoadBalancerType.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 -{ - /// Load Balancer Type. - public readonly partial struct LoadBalancerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LoadBalancerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string PublicIPValue = "PublicIp"; - private const string InternalLoadBalancerValue = "InternalLoadBalancer"; - - /// PublicIp. - public static LoadBalancerType PublicIP { get; } = new LoadBalancerType(PublicIPValue); - /// InternalLoadBalancer. - public static LoadBalancerType InternalLoadBalancer { get; } = new LoadBalancerType(InternalLoadBalancerValue); - /// Determines if two values are the same. - public static bool operator ==(LoadBalancerType left, LoadBalancerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LoadBalancerType left, LoadBalancerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LoadBalancerType(string value) => new LoadBalancerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LoadBalancerType other && Equals(other); - /// - public bool Equals(LoadBalancerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogVerbosity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogVerbosity.cs deleted file mode 100644 index 9185b0057fbb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/LogVerbosity.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 -{ - /// Enum for setting log verbosity. - public readonly partial struct LogVerbosity : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public LogVerbosity(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NotSetValue = "NotSet"; - private const string DebugValue = "Debug"; - private const string InfoValue = "Info"; - private const string WarningValue = "Warning"; - private const string ErrorValue = "Error"; - private const string CriticalValue = "Critical"; - - /// No logs emitted. - public static LogVerbosity NotSet { get; } = new LogVerbosity(NotSetValue); - /// Debug and above log statements logged. - public static LogVerbosity Debug { get; } = new LogVerbosity(DebugValue); - /// Info and above log statements logged. - public static LogVerbosity Info { get; } = new LogVerbosity(InfoValue); - /// Warning and above log statements logged. - public static LogVerbosity Warning { get; } = new LogVerbosity(WarningValue); - /// Error and above log statements logged. - public static LogVerbosity Error { get; } = new LogVerbosity(ErrorValue); - /// Only critical statements logged. - public static LogVerbosity Critical { get; } = new LogVerbosity(CriticalValue); - /// Determines if two values are the same. - public static bool operator ==(LogVerbosity left, LogVerbosity right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(LogVerbosity left, LogVerbosity right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator LogVerbosity(string value) => new LogVerbosity(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is LogVerbosity other && Equals(other); - /// - public bool Equals(LogVerbosity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobInput.Serialization.cs deleted file mode 100644 index 7d82bdf819ae..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobInput.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class MLFlowModelJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static MLFlowModelJobInput DeserializeMLFlowModelJobInput(JsonElement element) - { - Optional mode = default; - Uri uri = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new InputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new MLFlowModelJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobInput.cs deleted file mode 100644 index a7448eb01e4b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The MLFlowModelJobInput. - public partial class MLFlowModelJobInput : JobInput - { - /// Initializes a new instance of MLFlowModelJobInput. - /// [Required] Input Asset URI. - /// is null. - public MLFlowModelJobInput(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - JobInputType = JobInputType.MlflowModel; - } - - /// Initializes a new instance of MLFlowModelJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// Input Asset Delivery Mode. - /// [Required] Input Asset URI. - internal MLFlowModelJobInput(string description, JobInputType jobInputType, InputDeliveryMode? mode, Uri uri) : base(description, jobInputType) - { - Mode = mode; - Uri = uri; - JobInputType = jobInputType; - } - - /// Input Asset Delivery Mode. - public InputDeliveryMode? Mode { get; set; } - /// [Required] Input Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobOutput.Serialization.cs deleted file mode 100644 index 7453cfff7d07..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobOutput.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class MLFlowModelJobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - if (Uri != null) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static MLFlowModelJobOutput DeserializeMLFlowModelJobOutput(JsonElement element) - { - Optional mode = default; - Optional uri = default; - Optional description = default; - JobOutputType jobOutputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new OutputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobOutputType")) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } - } - return new MLFlowModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobOutput.cs deleted file mode 100644 index 5b4b882c9204..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLFlowModelJobOutput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The MLFlowModelJobOutput. - public partial class MLFlowModelJobOutput : JobOutput - { - /// Initializes a new instance of MLFlowModelJobOutput. - public MLFlowModelJobOutput() - { - JobOutputType = JobOutputType.MlflowModel; - } - - /// Initializes a new instance of MLFlowModelJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - /// Output Asset Delivery Mode. - /// Output Asset URI. - internal MLFlowModelJobOutput(string description, JobOutputType jobOutputType, OutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) - { - Mode = mode; - Uri = uri; - JobOutputType = jobOutputType; - } - - /// Output Asset Delivery Mode. - public OutputDeliveryMode? Mode { get; set; } - /// Output Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.Serialization.cs deleted file mode 100644 index 80979977a727..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.Serialization.cs +++ /dev/null @@ -1,217 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class MLTableData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(ReferencedUris)) - { - if (ReferencedUris != null) - { - writer.WritePropertyName("referencedUris"); - writer.WriteStartArray(); - foreach (var item in ReferencedUris) - { - writer.WriteStringValue(item.AbsoluteUri); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("referencedUris"); - } - } - writer.WritePropertyName("dataType"); - writer.WriteStringValue(DataType.ToString()); - writer.WritePropertyName("dataUri"); - writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static MLTableData DeserializeMLTableData(JsonElement element) - { - Optional> referencedUris = default; - DataType dataType = default; - Uri dataUri = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("referencedUris")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - referencedUris = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new Uri(item.GetString())); - } - referencedUris = array; - continue; - } - if (property.NameEquals("dataType")) - { - dataType = new DataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataUri")) - { - dataUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new MLTableData(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, Optional.ToList(referencedUris)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs deleted file mode 100644 index 450d45b4fbaa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableData.cs +++ /dev/null @@ -1,46 +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 -{ - /// MLTable data definition. - public partial class MLTableData : DataVersionProperties - { - /// Initializes a new instance of MLTableData. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - /// is null. - public MLTableData(Uri dataUri) : base(dataUri) - { - Argument.AssertNotNull(dataUri, nameof(dataUri)); - - ReferencedUris = new ChangeTrackingList(); - DataType = DataType.Mltable; - } - - /// Initializes a new instance of MLTableData. - /// 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?. - /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - /// Uris referenced in the MLTable definition (required for lineage). - internal MLTableData(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, DataType dataType, Uri dataUri, IList referencedUris) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) - { - ReferencedUris = referencedUris; - DataType = dataType; - } - - /// Uris referenced in the MLTable definition (required for lineage). - public IList ReferencedUris { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobInput.Serialization.cs deleted file mode 100644 index de8dfd471459..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobInput.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class MLTableJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static MLTableJobInput DeserializeMLTableJobInput(JsonElement element) - { - Optional mode = default; - Uri uri = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new InputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new MLTableJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobInput.cs deleted file mode 100644 index 973cbcde1d75..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The MLTableJobInput. - public partial class MLTableJobInput : JobInput - { - /// Initializes a new instance of MLTableJobInput. - /// [Required] Input Asset URI. - /// is null. - public MLTableJobInput(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - JobInputType = JobInputType.Mltable; - } - - /// Initializes a new instance of MLTableJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// Input Asset Delivery Mode. - /// [Required] Input Asset URI. - internal MLTableJobInput(string description, JobInputType jobInputType, InputDeliveryMode? mode, Uri uri) : base(description, jobInputType) - { - Mode = mode; - Uri = uri; - JobInputType = jobInputType; - } - - /// Input Asset Delivery Mode. - public InputDeliveryMode? Mode { get; set; } - /// [Required] Input Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobOutput.Serialization.cs deleted file mode 100644 index 00453ddb4a50..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobOutput.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class MLTableJobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - if (Uri != null) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static MLTableJobOutput DeserializeMLTableJobOutput(JsonElement element) - { - Optional mode = default; - Optional uri = default; - Optional description = default; - JobOutputType jobOutputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new OutputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobOutputType")) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } - } - return new MLTableJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobOutput.cs deleted file mode 100644 index f6f0f97c5116..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MLTableJobOutput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The MLTableJobOutput. - public partial class MLTableJobOutput : JobOutput - { - /// Initializes a new instance of MLTableJobOutput. - public MLTableJobOutput() - { - JobOutputType = JobOutputType.Mltable; - } - - /// Initializes a new instance of MLTableJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - /// Output Asset Delivery Mode. - /// Output Asset URI. - internal MLTableJobOutput(string description, JobOutputType jobOutputType, OutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) - { - Mode = mode; - Uri = uri; - JobOutputType = jobOutputType; - } - - /// Output Asset Delivery Mode. - public OutputDeliveryMode? Mode { get; set; } - /// Output Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreCredentials.Serialization.cs new file mode 100644 index 000000000000..bc00d02da8f6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreCredentials.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAccountKeyDatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("secrets"); + writer.WriteObjectValue(Secrets); + writer.WritePropertyName("credentialsType"); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningAccountKeyDatastoreCredentials DeserializeMachineLearningAccountKeyDatastoreCredentials(JsonElement element) + { + MachineLearningAccountKeyDatastoreSecrets secrets = default; + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secrets")) + { + secrets = MachineLearningAccountKeyDatastoreSecrets.DeserializeMachineLearningAccountKeyDatastoreSecrets(property.Value); + continue; + } + if (property.NameEquals("credentialsType")) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningAccountKeyDatastoreCredentials(credentialsType, secrets); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreCredentials.cs new file mode 100644 index 000000000000..9be8c6453468 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreCredentials.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Account key datastore credentials configuration. + /// Serialized Name: AccountKeyDatastoreCredentials + /// + public partial class MachineLearningAccountKeyDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of MachineLearningAccountKeyDatastoreCredentials. + /// + /// [Required] Storage account secrets. + /// Serialized Name: AccountKeyDatastoreCredentials.secrets + /// + /// is null. + public MachineLearningAccountKeyDatastoreCredentials(MachineLearningAccountKeyDatastoreSecrets secrets) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + + Secrets = secrets; + CredentialsType = CredentialsType.AccountKey; + } + + /// Initializes a new instance of MachineLearningAccountKeyDatastoreCredentials. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + /// + /// [Required] Storage account secrets. + /// Serialized Name: AccountKeyDatastoreCredentials.secrets + /// + internal MachineLearningAccountKeyDatastoreCredentials(CredentialsType credentialsType, MachineLearningAccountKeyDatastoreSecrets secrets) : base(credentialsType) + { + Secrets = secrets; + CredentialsType = credentialsType; + } + + /// + /// [Required] Storage account secrets. + /// Serialized Name: AccountKeyDatastoreCredentials.secrets + /// + public MachineLearningAccountKeyDatastoreSecrets Secrets { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreSecrets.Serialization.cs new file mode 100644 index 000000000000..1643e6c1942f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreSecrets.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAccountKeyDatastoreSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Key)) + { + if (Key != null) + { + writer.WritePropertyName("key"); + writer.WriteStringValue(Key); + } + else + { + writer.WriteNull("key"); + } + } + writer.WritePropertyName("secretsType"); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningAccountKeyDatastoreSecrets DeserializeMachineLearningAccountKeyDatastoreSecrets(JsonElement element) + { + Optional key = default; + SecretsType secretsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + key = null; + continue; + } + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretsType")) + { + secretsType = new SecretsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningAccountKeyDatastoreSecrets(secretsType, key.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreSecrets.cs new file mode 100644 index 000000000000..90c08a38ad55 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAccountKeyDatastoreSecrets.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Datastore account key secrets. + /// Serialized Name: AccountKeyDatastoreSecrets + /// + public partial class MachineLearningAccountKeyDatastoreSecrets : MachineLearningDatastoreSecrets + { + /// Initializes a new instance of MachineLearningAccountKeyDatastoreSecrets. + public MachineLearningAccountKeyDatastoreSecrets() + { + SecretsType = SecretsType.AccountKey; + } + + /// Initializes a new instance of MachineLearningAccountKeyDatastoreSecrets. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// + /// + /// Storage account key. + /// Serialized Name: AccountKeyDatastoreSecrets.key + /// + internal MachineLearningAccountKeyDatastoreSecrets(SecretsType secretsType, string key) : base(secretsType) + { + Key = key; + SecretsType = secretsType; + } + + /// + /// Storage account key. + /// Serialized Name: AccountKeyDatastoreSecrets.key + /// + public string Key { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksCompute.Serialization.cs new file mode 100644 index 000000000000..359c00b19372 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksCompute.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAksCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningAksCompute DeserializeMachineLearningAksCompute(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningAksComputeProperties.DeserializeMachineLearningAksComputeProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningAksCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksCompute.cs new file mode 100644 index 000000000000..91e7a2821fa4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksCompute.cs @@ -0,0 +1,83 @@ +// 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 +{ + /// + /// A Machine Learning compute based on AKS. + /// Serialized Name: AKS + /// + public partial class MachineLearningAksCompute : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningAksCompute. + public MachineLearningAksCompute() + { + ComputeType = ComputeType.Aks; + } + + /// Initializes a new instance of MachineLearningAksCompute. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// + /// AKS properties + /// Serialized Name: AKSSchema.properties + /// + internal MachineLearningAksCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningAksComputeProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// + /// AKS properties + /// Serialized Name: AKSSchema.properties + /// + public MachineLearningAksComputeProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeProperties.Serialization.cs new file mode 100644 index 000000000000..9a9662e28c93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeProperties.Serialization.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAksComputeProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClusterFqdn)) + { + if (ClusterFqdn != null) + { + writer.WritePropertyName("clusterFqdn"); + writer.WriteStringValue(ClusterFqdn); + } + else + { + writer.WriteNull("clusterFqdn"); + } + } + if (Optional.IsDefined(AgentCount)) + { + if (AgentCount != null) + { + writer.WritePropertyName("agentCount"); + writer.WriteNumberValue(AgentCount.Value); + } + else + { + writer.WriteNull("agentCount"); + } + } + if (Optional.IsDefined(AgentVmSize)) + { + if (AgentVmSize != null) + { + writer.WritePropertyName("agentVmSize"); + writer.WriteStringValue(AgentVmSize); + } + else + { + writer.WriteNull("agentVmSize"); + } + } + if (Optional.IsDefined(ClusterPurpose)) + { + writer.WritePropertyName("clusterPurpose"); + writer.WriteStringValue(ClusterPurpose.Value.ToString()); + } + if (Optional.IsDefined(SslConfiguration)) + { + if (SslConfiguration != null) + { + writer.WritePropertyName("sslConfiguration"); + writer.WriteObjectValue(SslConfiguration); + } + else + { + writer.WriteNull("sslConfiguration"); + } + } + if (Optional.IsDefined(AksNetworkingConfiguration)) + { + if (AksNetworkingConfiguration != null) + { + writer.WritePropertyName("aksNetworkingConfiguration"); + writer.WriteObjectValue(AksNetworkingConfiguration); + } + else + { + writer.WriteNull("aksNetworkingConfiguration"); + } + } + if (Optional.IsDefined(LoadBalancerType)) + { + writer.WritePropertyName("loadBalancerType"); + writer.WriteStringValue(LoadBalancerType.Value.ToString()); + } + if (Optional.IsDefined(LoadBalancerSubnet)) + { + if (LoadBalancerSubnet != null) + { + writer.WritePropertyName("loadBalancerSubnet"); + writer.WriteStringValue(LoadBalancerSubnet); + } + else + { + writer.WriteNull("loadBalancerSubnet"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAksComputeProperties DeserializeMachineLearningAksComputeProperties(JsonElement element) + { + Optional clusterFqdn = default; + Optional> systemServices = default; + Optional agentCount = default; + Optional agentVmSize = default; + Optional clusterPurpose = default; + Optional sslConfiguration = default; + Optional aksNetworkingConfiguration = default; + Optional loadBalancerType = default; + Optional loadBalancerSubnet = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterFqdn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + clusterFqdn = null; + continue; + } + clusterFqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("systemServices")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + systemServices = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningComputeSystemService.DeserializeMachineLearningComputeSystemService(item)); + } + systemServices = array; + continue; + } + if (property.NameEquals("agentCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + agentCount = null; + continue; + } + agentCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("agentVmSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + agentVmSize = null; + continue; + } + agentVmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("clusterPurpose")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + clusterPurpose = new MachineLearningClusterPurpose(property.Value.GetString()); + continue; + } + if (property.NameEquals("sslConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sslConfiguration = null; + continue; + } + sslConfiguration = MachineLearningSslConfiguration.DeserializeMachineLearningSslConfiguration(property.Value); + continue; + } + if (property.NameEquals("aksNetworkingConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + aksNetworkingConfiguration = null; + continue; + } + aksNetworkingConfiguration = MachineLearningAksNetworkingConfiguration.DeserializeMachineLearningAksNetworkingConfiguration(property.Value); + continue; + } + if (property.NameEquals("loadBalancerType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + loadBalancerType = new MachineLearningLoadBalancerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("loadBalancerSubnet")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + loadBalancerSubnet = null; + continue; + } + loadBalancerSubnet = property.Value.GetString(); + continue; + } + } + return new MachineLearningAksComputeProperties(clusterFqdn.Value, Optional.ToList(systemServices), Optional.ToNullable(agentCount), agentVmSize.Value, Optional.ToNullable(clusterPurpose), sslConfiguration.Value, aksNetworkingConfiguration.Value, Optional.ToNullable(loadBalancerType), loadBalancerSubnet.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeProperties.cs new file mode 100644 index 000000000000..4ac6931f48f9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeProperties.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// AKS properties + /// Serialized Name: AKSSchemaProperties + /// + public partial class MachineLearningAksComputeProperties + { + /// Initializes a new instance of MachineLearningAksComputeProperties. + public MachineLearningAksComputeProperties() + { + SystemServices = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningAksComputeProperties. + /// + /// Cluster full qualified domain name + /// Serialized Name: AKSSchemaProperties.clusterFqdn + /// + /// + /// System services + /// Serialized Name: AKSSchemaProperties.systemServices + /// + /// + /// Number of agents + /// Serialized Name: AKSSchemaProperties.agentCount + /// + /// + /// Agent virtual machine size + /// Serialized Name: AKSSchemaProperties.agentVmSize + /// + /// + /// Intended usage of the cluster + /// Serialized Name: AKSSchemaProperties.clusterPurpose + /// + /// + /// SSL configuration + /// Serialized Name: AKSSchemaProperties.sslConfiguration + /// + /// + /// AKS networking configuration for vnet + /// Serialized Name: AKSSchemaProperties.aksNetworkingConfiguration + /// + /// + /// Load Balancer Type + /// Serialized Name: AKSSchemaProperties.loadBalancerType + /// + /// + /// Load Balancer Subnet + /// Serialized Name: AKSSchemaProperties.loadBalancerSubnet + /// + internal MachineLearningAksComputeProperties(string clusterFqdn, IReadOnlyList systemServices, int? agentCount, string agentVmSize, MachineLearningClusterPurpose? clusterPurpose, MachineLearningSslConfiguration sslConfiguration, MachineLearningAksNetworkingConfiguration aksNetworkingConfiguration, MachineLearningLoadBalancerType? loadBalancerType, string loadBalancerSubnet) + { + ClusterFqdn = clusterFqdn; + SystemServices = systemServices; + AgentCount = agentCount; + AgentVmSize = agentVmSize; + ClusterPurpose = clusterPurpose; + SslConfiguration = sslConfiguration; + AksNetworkingConfiguration = aksNetworkingConfiguration; + LoadBalancerType = loadBalancerType; + LoadBalancerSubnet = loadBalancerSubnet; + } + + /// + /// Cluster full qualified domain name + /// Serialized Name: AKSSchemaProperties.clusterFqdn + /// + public string ClusterFqdn { get; set; } + /// + /// System services + /// Serialized Name: AKSSchemaProperties.systemServices + /// + public IReadOnlyList SystemServices { get; } + /// + /// Number of agents + /// Serialized Name: AKSSchemaProperties.agentCount + /// + public int? AgentCount { get; set; } + /// + /// Agent virtual machine size + /// Serialized Name: AKSSchemaProperties.agentVmSize + /// + public string AgentVmSize { get; set; } + /// + /// Intended usage of the cluster + /// Serialized Name: AKSSchemaProperties.clusterPurpose + /// + public MachineLearningClusterPurpose? ClusterPurpose { get; set; } + /// + /// SSL configuration + /// Serialized Name: AKSSchemaProperties.sslConfiguration + /// + public MachineLearningSslConfiguration SslConfiguration { get; set; } + /// + /// AKS networking configuration for vnet + /// Serialized Name: AKSSchemaProperties.aksNetworkingConfiguration + /// + public MachineLearningAksNetworkingConfiguration AksNetworkingConfiguration { get; set; } + /// + /// Load Balancer Type + /// Serialized Name: AKSSchemaProperties.loadBalancerType + /// + public MachineLearningLoadBalancerType? LoadBalancerType { get; set; } + /// + /// Load Balancer Subnet + /// Serialized Name: AKSSchemaProperties.loadBalancerSubnet + /// + public string LoadBalancerSubnet { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeSecrets.Serialization.cs new file mode 100644 index 000000000000..c4655a359806 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeSecrets.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAksComputeSecrets + { + internal static MachineLearningAksComputeSecrets DeserializeMachineLearningAksComputeSecrets(JsonElement element) + { + Optional userKubeConfig = default; + Optional adminKubeConfig = default; + Optional imagePullSecretName = default; + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userKubeConfig")) + { + userKubeConfig = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminKubeConfig")) + { + adminKubeConfig = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePullSecretName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + imagePullSecretName = null; + continue; + } + imagePullSecretName = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new MachineLearningAksComputeSecrets(computeType, userKubeConfig.Value, adminKubeConfig.Value, imagePullSecretName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeSecrets.cs new file mode 100644 index 000000000000..be68d9d8746d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksComputeSecrets.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Secrets related to a Machine Learning compute based on AKS. + /// Serialized Name: AksComputeSecrets + /// + public partial class MachineLearningAksComputeSecrets : MachineLearningComputeSecrets + { + /// Initializes a new instance of MachineLearningAksComputeSecrets. + internal MachineLearningAksComputeSecrets() + { + ComputeType = ComputeType.Aks; + } + + /// Initializes a new instance of MachineLearningAksComputeSecrets. + /// + /// The type of compute + /// Serialized Name: ComputeSecrets.computeType + /// + /// + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Serialized Name: AksComputeSecretsProperties.userKubeConfig + /// + /// + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Serialized Name: AksComputeSecretsProperties.adminKubeConfig + /// + /// + /// Image registry pull secret. + /// Serialized Name: AksComputeSecretsProperties.imagePullSecretName + /// + internal MachineLearningAksComputeSecrets(ComputeType computeType, string userKubeConfig, string adminKubeConfig, string imagePullSecretName) : base(computeType) + { + UserKubeConfig = userKubeConfig; + AdminKubeConfig = adminKubeConfig; + ImagePullSecretName = imagePullSecretName; + ComputeType = computeType; + } + + /// + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Serialized Name: AksComputeSecretsProperties.userKubeConfig + /// + public string UserKubeConfig { get; } + /// + /// Content of kubeconfig file that can be used to connect to the Kubernetes cluster. + /// Serialized Name: AksComputeSecretsProperties.adminKubeConfig + /// + public string AdminKubeConfig { get; } + /// + /// Image registry pull secret. + /// Serialized Name: AksComputeSecretsProperties.imagePullSecretName + /// + public string ImagePullSecretName { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksNetworkingConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksNetworkingConfiguration.Serialization.cs new file mode 100644 index 000000000000..7958ee29b4eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksNetworkingConfiguration.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAksNetworkingConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SubnetId)) + { + writer.WritePropertyName("subnetId"); + writer.WriteStringValue(SubnetId); + } + if (Optional.IsDefined(ServiceCidr)) + { + writer.WritePropertyName("serviceCidr"); + writer.WriteStringValue(ServiceCidr); + } + if (Optional.IsDefined(DnsServiceIP)) + { + writer.WritePropertyName("dnsServiceIP"); + writer.WriteStringValue(DnsServiceIP); + } + if (Optional.IsDefined(DockerBridgeCidr)) + { + writer.WritePropertyName("dockerBridgeCidr"); + writer.WriteStringValue(DockerBridgeCidr); + } + writer.WriteEndObject(); + } + + internal static MachineLearningAksNetworkingConfiguration DeserializeMachineLearningAksNetworkingConfiguration(JsonElement element) + { + Optional subnetId = default; + Optional serviceCidr = default; + Optional dnsServiceIP = default; + Optional dockerBridgeCidr = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceCidr")) + { + serviceCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("dnsServiceIP")) + { + dnsServiceIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("dockerBridgeCidr")) + { + dockerBridgeCidr = property.Value.GetString(); + continue; + } + } + return new MachineLearningAksNetworkingConfiguration(subnetId.Value, serviceCidr.Value, dnsServiceIP.Value, dockerBridgeCidr.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksNetworkingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksNetworkingConfiguration.cs new file mode 100644 index 000000000000..09e367016bf2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAksNetworkingConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Advance configuration for AKS networking + /// Serialized Name: AksNetworkingConfiguration + /// + public partial class MachineLearningAksNetworkingConfiguration + { + /// Initializes a new instance of MachineLearningAksNetworkingConfiguration. + public MachineLearningAksNetworkingConfiguration() + { + } + + /// Initializes a new instance of MachineLearningAksNetworkingConfiguration. + /// + /// Virtual network subnet resource ID the compute nodes belong to + /// Serialized Name: AksNetworkingConfiguration.subnetId + /// + /// + /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + /// Serialized Name: AksNetworkingConfiguration.serviceCidr + /// + /// + /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + /// Serialized Name: AksNetworkingConfiguration.dnsServiceIP + /// + /// + /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + /// Serialized Name: AksNetworkingConfiguration.dockerBridgeCidr + /// + internal MachineLearningAksNetworkingConfiguration(ResourceIdentifier subnetId, string serviceCidr, string dnsServiceIP, string dockerBridgeCidr) + { + SubnetId = subnetId; + ServiceCidr = serviceCidr; + DnsServiceIP = dnsServiceIP; + DockerBridgeCidr = dockerBridgeCidr; + } + + /// + /// Virtual network subnet resource ID the compute nodes belong to + /// Serialized Name: AksNetworkingConfiguration.subnetId + /// + public ResourceIdentifier SubnetId { get; set; } + /// + /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. + /// Serialized Name: AksNetworkingConfiguration.serviceCidr + /// + public string ServiceCidr { get; set; } + /// + /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr. + /// Serialized Name: AksNetworkingConfiguration.dnsServiceIP + /// + public string DnsServiceIP { get; set; } + /// + /// A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range. + /// Serialized Name: AksNetworkingConfiguration.dockerBridgeCidr + /// + public string DockerBridgeCidr { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningApplicationSharingPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningApplicationSharingPolicy.cs new file mode 100644 index 000000000000..339d1a542d05 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningApplicationSharingPolicy.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// 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. + /// Serialized Name: ApplicationSharingPolicy + /// + public readonly partial struct MachineLearningApplicationSharingPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningApplicationSharingPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PersonalValue = "Personal"; + private const string SharedValue = "Shared"; + + /// + /// Personal + /// Serialized Name: ApplicationSharingPolicy.Personal + /// + public static MachineLearningApplicationSharingPolicy Personal { get; } = new MachineLearningApplicationSharingPolicy(PersonalValue); + /// + /// Shared + /// Serialized Name: ApplicationSharingPolicy.Shared + /// + public static MachineLearningApplicationSharingPolicy Shared { get; } = new MachineLearningApplicationSharingPolicy(SharedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningApplicationSharingPolicy left, MachineLearningApplicationSharingPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningApplicationSharingPolicy left, MachineLearningApplicationSharingPolicy right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningApplicationSharingPolicy(string value) => new MachineLearningApplicationSharingPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningApplicationSharingPolicy other && Equals(other); + /// + public bool Equals(MachineLearningApplicationSharingPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..c3d8cff77aa1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.Serialization.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAssetBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAssetBase DeserializeMachineLearningAssetBase(JsonElement element) + { + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningAssetBase(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs new file mode 100644 index 000000000000..2b18e533870e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetBase.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningAssetBase. + /// Serialized Name: AssetBase + /// + public partial class MachineLearningAssetBase : MachineLearningResourceBase + { + /// Initializes a new instance of MachineLearningAssetBase. + public MachineLearningAssetBase() + { + } + + /// Initializes a new instance of MachineLearningAssetBase. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + internal MachineLearningAssetBase(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived) : base(description, properties, tags) + { + IsAnonymous = isAnonymous; + IsArchived = isArchived; + } + + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + public bool? IsAnonymous { get; set; } + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + public bool? IsArchived { 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 new file mode 100644 index 000000000000..7d85ff6c9806 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAssetContainer : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAssetContainer DeserializeMachineLearningAssetContainer(JsonElement element) + { + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningAssetContainer(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs new file mode 100644 index 000000000000..65e8375848f8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetContainer.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningAssetContainer. + /// Serialized Name: AssetContainer + /// + public partial class MachineLearningAssetContainer : MachineLearningResourceBase + { + /// Initializes a new instance of MachineLearningAssetContainer. + public MachineLearningAssetContainer() + { + } + + /// Initializes a new instance of MachineLearningAssetContainer. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + internal MachineLearningAssetContainer(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags) + { + IsArchived = isArchived; + LatestVersion = latestVersion; + NextVersion = nextVersion; + } + + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + public bool? IsArchived { get; set; } + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + public string LatestVersion { get; } + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + public string NextVersion { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs new file mode 100644 index 000000000000..9e5f697fb4b1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAssetReferenceBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("referenceType"); + writer.WriteStringValue(ReferenceType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningAssetReferenceBase DeserializeMachineLearningAssetReferenceBase(JsonElement element) + { + if (element.TryGetProperty("referenceType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "DataPath": return MachineLearningDataPathAssetReference.DeserializeMachineLearningDataPathAssetReference(element); + case "Id": return MachineLearningIdAssetReference.DeserializeMachineLearningIdAssetReference(element); + case "OutputPath": return MachineLearningOutputPathAssetReference.DeserializeMachineLearningOutputPathAssetReference(element); + } + } + return UnknownAssetReferenceBase.DeserializeUnknownAssetReferenceBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs new file mode 100644 index 000000000000..37a072aac824 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAssetReferenceBase.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Base definition for asset references. + /// Serialized Name: AssetReferenceBase + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningAssetReferenceBase + { + /// Initializes a new instance of MachineLearningAssetReferenceBase. + protected MachineLearningAssetReferenceBase() + { + } + + /// Initializes a new instance of MachineLearningAssetReferenceBase. + /// + /// [Required] Specifies the type of asset reference. + /// Serialized Name: AssetReferenceBase.referenceType + /// + internal MachineLearningAssetReferenceBase(ReferenceType referenceType) + { + ReferenceType = referenceType; + } + + /// + /// [Required] Specifies the type of asset reference. + /// Serialized Name: AssetReferenceBase.referenceType + /// + internal ReferenceType ReferenceType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoPauseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoPauseProperties.Serialization.cs new file mode 100644 index 000000000000..a24f01ad976e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoPauseProperties.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAutoPauseProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DelayInMinutes)) + { + writer.WritePropertyName("delayInMinutes"); + writer.WriteNumberValue(DelayInMinutes.Value); + } + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(IsEnabled.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningAutoPauseProperties DeserializeMachineLearningAutoPauseProperties(JsonElement element) + { + Optional delayInMinutes = default; + Optional enabled = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("delayInMinutes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + delayInMinutes = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("enabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningAutoPauseProperties(Optional.ToNullable(delayInMinutes), Optional.ToNullable(enabled)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoPauseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoPauseProperties.cs new file mode 100644 index 000000000000..2f60d7caca89 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoPauseProperties.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Auto pause properties + /// Serialized Name: AutoPauseProperties + /// + public partial class MachineLearningAutoPauseProperties + { + /// Initializes a new instance of MachineLearningAutoPauseProperties. + public MachineLearningAutoPauseProperties() + { + } + + /// Initializes a new instance of MachineLearningAutoPauseProperties. + /// Serialized Name: AutoPauseProperties.delayInMinutes. + /// Serialized Name: AutoPauseProperties.enabled. + internal MachineLearningAutoPauseProperties(int? delayInMinutes, bool? isEnabled) + { + DelayInMinutes = delayInMinutes; + IsEnabled = isEnabled; + } + + /// Serialized Name: AutoPauseProperties.delayInMinutes. + public int? DelayInMinutes { get; set; } + /// Serialized Name: AutoPauseProperties.enabled. + public bool? IsEnabled { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoScaleProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoScaleProperties.Serialization.cs new file mode 100644 index 000000000000..bcc94e22db2b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoScaleProperties.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAutoScaleProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MinNodeCount)) + { + writer.WritePropertyName("minNodeCount"); + writer.WriteNumberValue(MinNodeCount.Value); + } + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("enabled"); + writer.WriteBooleanValue(IsEnabled.Value); + } + if (Optional.IsDefined(MaxNodeCount)) + { + writer.WritePropertyName("maxNodeCount"); + writer.WriteNumberValue(MaxNodeCount.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningAutoScaleProperties DeserializeMachineLearningAutoScaleProperties(JsonElement element) + { + Optional minNodeCount = default; + Optional enabled = default; + Optional maxNodeCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("enabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("maxNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxNodeCount = property.Value.GetInt32(); + continue; + } + } + return new MachineLearningAutoScaleProperties(Optional.ToNullable(minNodeCount), Optional.ToNullable(enabled), Optional.ToNullable(maxNodeCount)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoScaleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoScaleProperties.cs new file mode 100644 index 000000000000..2cd325f6b9f2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAutoScaleProperties.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Auto scale properties + /// Serialized Name: AutoScaleProperties + /// + public partial class MachineLearningAutoScaleProperties + { + /// Initializes a new instance of MachineLearningAutoScaleProperties. + public MachineLearningAutoScaleProperties() + { + } + + /// Initializes a new instance of MachineLearningAutoScaleProperties. + /// Serialized Name: AutoScaleProperties.minNodeCount. + /// Serialized Name: AutoScaleProperties.enabled. + /// Serialized Name: AutoScaleProperties.maxNodeCount. + internal MachineLearningAutoScaleProperties(int? minNodeCount, bool? isEnabled, int? maxNodeCount) + { + MinNodeCount = minNodeCount; + IsEnabled = isEnabled; + MaxNodeCount = maxNodeCount; + } + + /// Serialized Name: AutoScaleProperties.minNodeCount. + public int? MinNodeCount { get; set; } + /// Serialized Name: AutoScaleProperties.enabled. + public bool? IsEnabled { get; set; } + /// Serialized Name: AutoScaleProperties.maxNodeCount. + public int? MaxNodeCount { get; set; } + } +} 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 new file mode 100644 index 000000000000..8e39b450cdf6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.Serialization.cs @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAzureBlobDatastore : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AccountName)) + { + if (AccountName != null) + { + writer.WritePropertyName("accountName"); + writer.WriteStringValue(AccountName); + } + else + { + writer.WriteNull("accountName"); + } + } + if (Optional.IsDefined(ContainerName)) + { + if (ContainerName != null) + { + writer.WritePropertyName("containerName"); + writer.WriteStringValue(ContainerName); + } + else + { + writer.WriteNull("containerName"); + } + } + if (Optional.IsDefined(Endpoint)) + { + if (Endpoint != null) + { + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + } + else + { + writer.WriteNull("endpoint"); + } + } + if (Optional.IsDefined(Protocol)) + { + if (Protocol != null) + { + writer.WritePropertyName("protocol"); + writer.WriteStringValue(Protocol); + } + else + { + writer.WriteNull("protocol"); + } + } + if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) + { + writer.WritePropertyName("serviceDataAccessAuthIdentity"); + writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); + } + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAzureBlobDatastore DeserializeMachineLearningAzureBlobDatastore(JsonElement element) + { + Optional accountName = default; + Optional containerName = default; + Optional endpoint = default; + Optional protocol = default; + Optional serviceDataAccessAuthIdentity = default; + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + accountName = null; + continue; + } + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containerName = null; + continue; + } + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endpoint = null; + continue; + } + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + protocol = null; + continue; + } + protocol = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceDataAccessAuthIdentity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); + continue; + } + if (property.NameEquals("credentials")) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType")) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningAzureBlobDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName.Value, containerName.Value, endpoint.Value, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs new file mode 100644 index 000000000000..1083cf139035 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureBlobDatastore.cs @@ -0,0 +1,118 @@ +// 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 +{ + /// + /// Azure Blob datastore configuration. + /// Serialized Name: AzureBlobDatastore + /// + public partial class MachineLearningAzureBlobDatastore : MachineLearningDatastoreProperties + { + /// Initializes a new instance of MachineLearningAzureBlobDatastore. + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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 . + /// + /// is null. + public MachineLearningAzureBlobDatastore(MachineLearningDatastoreCredentials credentials) : base(credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + + DatastoreType = DatastoreType.AzureBlob; + } + + /// Initializes a new instance of MachineLearningAzureBlobDatastore. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: Datastore.datastoreType + /// + /// + /// Readonly property to indicate if datastore is the workspace default datastore + /// Serialized Name: Datastore.isDefault + /// + /// + /// Storage account name. + /// Serialized Name: AzureBlobDatastore.accountName + /// + /// + /// Storage account container name. + /// Serialized Name: AzureBlobDatastore.containerName + /// + /// + /// Azure cloud endpoint for the storage account. + /// Serialized Name: AzureBlobDatastore.endpoint + /// + /// + /// Protocol used to communicate with the storage account. + /// Serialized Name: AzureBlobDatastore.protocol + /// + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureBlobDatastore.serviceDataAccessAuthIdentity + /// + internal MachineLearningAzureBlobDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string containerName, string endpoint, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) + { + AccountName = accountName; + ContainerName = containerName; + Endpoint = endpoint; + Protocol = protocol; + ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + DatastoreType = datastoreType; + } + + /// + /// Storage account name. + /// Serialized Name: AzureBlobDatastore.accountName + /// + public string AccountName { get; set; } + /// + /// Storage account container name. + /// Serialized Name: AzureBlobDatastore.containerName + /// + public string ContainerName { get; set; } + /// + /// Azure cloud endpoint for the storage account. + /// Serialized Name: AzureBlobDatastore.endpoint + /// + public string Endpoint { get; set; } + /// + /// Protocol used to communicate with the storage account. + /// Serialized Name: AzureBlobDatastore.protocol + /// + public string Protocol { get; set; } + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureBlobDatastore.serviceDataAccessAuthIdentity + /// + public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { 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 new file mode 100644 index 000000000000..0aeee53c792a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAzureDataLakeGen1Datastore : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) + { + writer.WritePropertyName("serviceDataAccessAuthIdentity"); + writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); + } + writer.WritePropertyName("storeName"); + writer.WriteStringValue(StoreName); + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAzureDataLakeGen1Datastore DeserializeMachineLearningAzureDataLakeGen1Datastore(JsonElement element) + { + Optional serviceDataAccessAuthIdentity = default; + string storeName = default; + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceDataAccessAuthIdentity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); + continue; + } + if (property.NameEquals("storeName")) + { + storeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("credentials")) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType")) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningAzureDataLakeGen1Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), Optional.ToNullable(serviceDataAccessAuthIdentity), storeName); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs new file mode 100644 index 000000000000..a141e1b84b1b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen1Datastore.cs @@ -0,0 +1,94 @@ +// 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 +{ + /// + /// Azure Data Lake Gen1 datastore configuration. + /// Serialized Name: AzureDataLakeGen1Datastore + /// + public partial class MachineLearningAzureDataLakeGen1Datastore : MachineLearningDatastoreProperties + { + /// Initializes a new instance of MachineLearningAzureDataLakeGen1Datastore. + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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] Azure Data Lake store name. + /// Serialized Name: AzureDataLakeGen1Datastore.storeName + /// + /// or is null. + public MachineLearningAzureDataLakeGen1Datastore(MachineLearningDatastoreCredentials credentials, string storeName) : base(credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + Argument.AssertNotNull(storeName, nameof(storeName)); + + StoreName = storeName; + DatastoreType = DatastoreType.AzureDataLakeGen1; + } + + /// Initializes a new instance of MachineLearningAzureDataLakeGen1Datastore. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: Datastore.datastoreType + /// + /// + /// Readonly property to indicate if datastore is the workspace default datastore + /// Serialized Name: Datastore.isDefault + /// + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureDataLakeGen1Datastore.serviceDataAccessAuthIdentity + /// + /// + /// [Required] Azure Data Lake store name. + /// Serialized Name: AzureDataLakeGen1Datastore.storeName + /// + internal MachineLearningAzureDataLakeGen1Datastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity, string storeName) : base(description, properties, tags, credentials, datastoreType, isDefault) + { + ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + StoreName = storeName; + DatastoreType = datastoreType; + } + + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureDataLakeGen1Datastore.serviceDataAccessAuthIdentity + /// + public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } + /// + /// [Required] Azure Data Lake store name. + /// Serialized Name: AzureDataLakeGen1Datastore.storeName + /// + public string StoreName { 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 new file mode 100644 index 000000000000..455c478cfe37 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAzureDataLakeGen2Datastore : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("accountName"); + writer.WriteStringValue(AccountName); + if (Optional.IsDefined(Endpoint)) + { + if (Endpoint != null) + { + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + } + else + { + writer.WriteNull("endpoint"); + } + } + writer.WritePropertyName("filesystem"); + writer.WriteStringValue(Filesystem); + if (Optional.IsDefined(Protocol)) + { + if (Protocol != null) + { + writer.WritePropertyName("protocol"); + writer.WriteStringValue(Protocol); + } + else + { + writer.WriteNull("protocol"); + } + } + if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) + { + writer.WritePropertyName("serviceDataAccessAuthIdentity"); + writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); + } + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAzureDataLakeGen2Datastore DeserializeMachineLearningAzureDataLakeGen2Datastore(JsonElement element) + { + string accountName = default; + Optional endpoint = default; + string filesystem = default; + Optional protocol = default; + Optional serviceDataAccessAuthIdentity = default; + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName")) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endpoint = null; + continue; + } + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("filesystem")) + { + filesystem = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + protocol = null; + continue; + } + protocol = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceDataAccessAuthIdentity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); + continue; + } + if (property.NameEquals("credentials")) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType")) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningAzureDataLakeGen2Datastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName, endpoint.Value, filesystem, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs new file mode 100644 index 000000000000..3e3f5b611945 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureDataLakeGen2Datastore.cs @@ -0,0 +1,130 @@ +// 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 +{ + /// + /// Azure Data Lake Gen2 datastore configuration. + /// Serialized Name: AzureDataLakeGen2Datastore + /// + public partial class MachineLearningAzureDataLakeGen2Datastore : MachineLearningDatastoreProperties + { + /// Initializes a new instance of MachineLearningAzureDataLakeGen2Datastore. + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: AzureDataLakeGen2Datastore.accountName + /// + /// + /// [Required] The name of the Data Lake Gen2 filesystem. + /// Serialized Name: AzureDataLakeGen2Datastore.filesystem + /// + /// , or is null. + public MachineLearningAzureDataLakeGen2Datastore(MachineLearningDatastoreCredentials credentials, string accountName, string filesystem) : base(credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + Argument.AssertNotNull(accountName, nameof(accountName)); + Argument.AssertNotNull(filesystem, nameof(filesystem)); + + AccountName = accountName; + Filesystem = filesystem; + DatastoreType = DatastoreType.AzureDataLakeGen2; + } + + /// Initializes a new instance of MachineLearningAzureDataLakeGen2Datastore. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: Datastore.datastoreType + /// + /// + /// Readonly property to indicate if datastore is the workspace default datastore + /// Serialized Name: Datastore.isDefault + /// + /// + /// [Required] Storage account name. + /// Serialized Name: AzureDataLakeGen2Datastore.accountName + /// + /// + /// Azure cloud endpoint for the storage account. + /// Serialized Name: AzureDataLakeGen2Datastore.endpoint + /// + /// + /// [Required] The name of the Data Lake Gen2 filesystem. + /// Serialized Name: AzureDataLakeGen2Datastore.filesystem + /// + /// + /// Protocol used to communicate with the storage account. + /// Serialized Name: AzureDataLakeGen2Datastore.protocol + /// + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureDataLakeGen2Datastore.serviceDataAccessAuthIdentity + /// + internal MachineLearningAzureDataLakeGen2Datastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string filesystem, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) + { + AccountName = accountName; + Endpoint = endpoint; + Filesystem = filesystem; + Protocol = protocol; + ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + DatastoreType = datastoreType; + } + + /// + /// [Required] Storage account name. + /// Serialized Name: AzureDataLakeGen2Datastore.accountName + /// + public string AccountName { get; set; } + /// + /// Azure cloud endpoint for the storage account. + /// Serialized Name: AzureDataLakeGen2Datastore.endpoint + /// + public string Endpoint { get; set; } + /// + /// [Required] The name of the Data Lake Gen2 filesystem. + /// Serialized Name: AzureDataLakeGen2Datastore.filesystem + /// + public string Filesystem { get; set; } + /// + /// Protocol used to communicate with the storage account. + /// Serialized Name: AzureDataLakeGen2Datastore.protocol + /// + public string Protocol { get; set; } + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureDataLakeGen2Datastore.serviceDataAccessAuthIdentity + /// + public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { 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 new file mode 100644 index 000000000000..b7687e18a8cc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.Serialization.cs @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningAzureFileDatastore : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("accountName"); + writer.WriteStringValue(AccountName); + if (Optional.IsDefined(Endpoint)) + { + if (Endpoint != null) + { + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + } + else + { + writer.WriteNull("endpoint"); + } + } + writer.WritePropertyName("fileShareName"); + writer.WriteStringValue(FileShareName); + if (Optional.IsDefined(Protocol)) + { + if (Protocol != null) + { + writer.WritePropertyName("protocol"); + writer.WriteStringValue(Protocol); + } + else + { + writer.WriteNull("protocol"); + } + } + if (Optional.IsDefined(ServiceDataAccessAuthIdentity)) + { + writer.WritePropertyName("serviceDataAccessAuthIdentity"); + writer.WriteStringValue(ServiceDataAccessAuthIdentity.Value.ToString()); + } + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningAzureFileDatastore DeserializeMachineLearningAzureFileDatastore(JsonElement element) + { + string accountName = default; + Optional endpoint = default; + string fileShareName = default; + Optional protocol = default; + Optional serviceDataAccessAuthIdentity = default; + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accountName")) + { + accountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoint")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endpoint = null; + continue; + } + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileShareName")) + { + fileShareName = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + protocol = null; + continue; + } + protocol = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceDataAccessAuthIdentity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + serviceDataAccessAuthIdentity = new MachineLearningServiceDataAccessAuthIdentity(property.Value.GetString()); + continue; + } + if (property.NameEquals("credentials")) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType")) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningAzureFileDatastore(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault), accountName, endpoint.Value, fileShareName, protocol.Value, Optional.ToNullable(serviceDataAccessAuthIdentity)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs new file mode 100644 index 000000000000..0ee5bd402097 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningAzureFileDatastore.cs @@ -0,0 +1,130 @@ +// 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 +{ + /// + /// Azure File datastore configuration. + /// Serialized Name: AzureFileDatastore + /// + public partial class MachineLearningAzureFileDatastore : MachineLearningDatastoreProperties + { + /// Initializes a new instance of MachineLearningAzureFileDatastore. + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: AzureFileDatastore.accountName + /// + /// + /// [Required] The name of the Azure file share that the datastore points to. + /// Serialized Name: AzureFileDatastore.fileShareName + /// + /// , or is null. + public MachineLearningAzureFileDatastore(MachineLearningDatastoreCredentials credentials, string accountName, string fileShareName) : base(credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + Argument.AssertNotNull(accountName, nameof(accountName)); + Argument.AssertNotNull(fileShareName, nameof(fileShareName)); + + AccountName = accountName; + FileShareName = fileShareName; + DatastoreType = DatastoreType.AzureFile; + } + + /// Initializes a new instance of MachineLearningAzureFileDatastore. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: Datastore.datastoreType + /// + /// + /// Readonly property to indicate if datastore is the workspace default datastore + /// Serialized Name: Datastore.isDefault + /// + /// + /// [Required] Storage account name. + /// Serialized Name: AzureFileDatastore.accountName + /// + /// + /// Azure cloud endpoint for the storage account. + /// Serialized Name: AzureFileDatastore.endpoint + /// + /// + /// [Required] The name of the Azure file share that the datastore points to. + /// Serialized Name: AzureFileDatastore.fileShareName + /// + /// + /// Protocol used to communicate with the storage account. + /// Serialized Name: AzureFileDatastore.protocol + /// + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureFileDatastore.serviceDataAccessAuthIdentity + /// + internal MachineLearningAzureFileDatastore(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault, string accountName, string endpoint, string fileShareName, string protocol, MachineLearningServiceDataAccessAuthIdentity? serviceDataAccessAuthIdentity) : base(description, properties, tags, credentials, datastoreType, isDefault) + { + AccountName = accountName; + Endpoint = endpoint; + FileShareName = fileShareName; + Protocol = protocol; + ServiceDataAccessAuthIdentity = serviceDataAccessAuthIdentity; + DatastoreType = datastoreType; + } + + /// + /// [Required] Storage account name. + /// Serialized Name: AzureFileDatastore.accountName + /// + public string AccountName { get; set; } + /// + /// Azure cloud endpoint for the storage account. + /// Serialized Name: AzureFileDatastore.endpoint + /// + public string Endpoint { get; set; } + /// + /// [Required] The name of the Azure file share that the datastore points to. + /// Serialized Name: AzureFileDatastore.fileShareName + /// + public string FileShareName { get; set; } + /// + /// Protocol used to communicate with the storage account. + /// Serialized Name: AzureFileDatastore.protocol + /// + public string Protocol { get; set; } + /// + /// Indicates which identity to use to authenticate service data access to customer's storage. + /// Serialized Name: AzureFileDatastore.serviceDataAccessAuthIdentity + /// + public MachineLearningServiceDataAccessAuthIdentity? ServiceDataAccessAuthIdentity { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentData.Serialization.cs new file mode 100644 index 000000000000..cf0fe31b692d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +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 MachineLearningBatchDeploymentData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"); + writer.WriteStringValue(Kind); + } + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static MachineLearningBatchDeploymentData DeserializeMachineLearningBatchDeploymentData(JsonElement element) + { + Optional identity = default; + Optional kind = default; + MachineLearningBatchDeploymentProperties properties = default; + Optional sku = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); + continue; + } + if (property.NameEquals("kind")) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = MachineLearningBatchDeploymentProperties.DeserializeMachineLearningBatchDeploymentProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location")) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningBatchDeploymentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentPatch.Serialization.cs new file mode 100644 index 000000000000..32f824d1f0e3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentPatch.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningBatchDeploymentPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentPatch.cs new file mode 100644 index 000000000000..1f821c4b805e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentPatch.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Strictly used in update requests. + /// Serialized Name: PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties + /// + public partial class MachineLearningBatchDeploymentPatch + { + /// Initializes a new instance of MachineLearningBatchDeploymentPatch. + public MachineLearningBatchDeploymentPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// + /// Additional attributes of the entity. + /// Serialized Name: PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.properties + /// + internal PartialBatchDeployment Properties { get; set; } + /// + /// Description of the endpoint deployment. + /// Serialized Name: PartialBatchDeployment.description + /// + public string PartialBatchDeploymentDescription + { + get => Properties is null ? default : Properties.Description; + set + { + if (Properties is null) + Properties = new PartialBatchDeployment(); + Properties.Description = value; + } + } + + /// + /// Resource tags. + /// Serialized Name: PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.tags + /// + public IDictionary Tags { get; } + } +} 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 new file mode 100644 index 000000000000..33de0fa69127 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.Serialization.cs @@ -0,0 +1,375 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningBatchDeploymentProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Compute)) + { + if (Compute != null) + { + writer.WritePropertyName("compute"); + writer.WriteStringValue(Compute); + } + else + { + writer.WriteNull("compute"); + } + } + if (Optional.IsDefined(ErrorThreshold)) + { + writer.WritePropertyName("errorThreshold"); + writer.WriteNumberValue(ErrorThreshold.Value); + } + if (Optional.IsDefined(LoggingLevel)) + { + writer.WritePropertyName("loggingLevel"); + writer.WriteStringValue(LoggingLevel.Value.ToString()); + } + if (Optional.IsDefined(MaxConcurrencyPerInstance)) + { + writer.WritePropertyName("maxConcurrencyPerInstance"); + writer.WriteNumberValue(MaxConcurrencyPerInstance.Value); + } + if (Optional.IsDefined(MiniBatchSize)) + { + writer.WritePropertyName("miniBatchSize"); + writer.WriteNumberValue(MiniBatchSize.Value); + } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"); + writer.WriteObjectValue(Model); + } + else + { + writer.WriteNull("model"); + } + } + if (Optional.IsDefined(OutputAction)) + { + writer.WritePropertyName("outputAction"); + writer.WriteStringValue(OutputAction.Value.ToString()); + } + if (Optional.IsDefined(OutputFileName)) + { + writer.WritePropertyName("outputFileName"); + writer.WriteStringValue(OutputFileName); + } + if (Optional.IsDefined(Resources)) + { + if (Resources != null) + { + writer.WritePropertyName("resources"); + writer.WriteObjectValue(Resources); + } + else + { + writer.WriteNull("resources"); + } + } + if (Optional.IsDefined(RetrySettings)) + { + if (RetrySettings != null) + { + writer.WritePropertyName("retrySettings"); + writer.WriteObjectValue(RetrySettings); + } + else + { + writer.WriteNull("retrySettings"); + } + } + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(EnvironmentId)) + { + if (EnvironmentId != null) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + else + { + writer.WriteNull("environmentId"); + } + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningBatchDeploymentProperties DeserializeMachineLearningBatchDeploymentProperties(JsonElement element) + { + Optional compute = default; + Optional errorThreshold = default; + Optional loggingLevel = default; + Optional maxConcurrencyPerInstance = default; + Optional miniBatchSize = default; + Optional model = default; + Optional outputAction = default; + Optional outputFileName = default; + Optional provisioningState = default; + Optional resources = default; + Optional retrySettings = default; + Optional codeConfiguration = default; + Optional description = default; + Optional environmentId = default; + Optional> environmentVariables = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("compute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + compute = null; + continue; + } + compute = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + errorThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("loggingLevel")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + loggingLevel = new MachineLearningBatchLoggingLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("maxConcurrencyPerInstance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxConcurrencyPerInstance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("miniBatchSize")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + miniBatchSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("model")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = MachineLearningAssetReferenceBase.DeserializeMachineLearningAssetReferenceBase(property.Value); + continue; + } + if (property.NameEquals("outputAction")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + outputAction = new MachineLearningBatchOutputAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("outputFileName")) + { + outputFileName = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("resources")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resources = null; + continue; + } + resources = MachineLearningDeploymentResourceConfiguration.DeserializeMachineLearningDeploymentResourceConfiguration(property.Value); + continue; + } + if (property.NameEquals("retrySettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + retrySettings = null; + continue; + } + retrySettings = MachineLearningBatchRetrySettings.DeserializeMachineLearningBatchRetrySettings(property.Value); + continue; + } + if (property.NameEquals("codeConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentId = null; + continue; + } + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = 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, property0.Value.GetString()); + } + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + } + return new MachineLearningBatchDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), compute.Value, Optional.ToNullable(errorThreshold), Optional.ToNullable(loggingLevel), Optional.ToNullable(maxConcurrencyPerInstance), Optional.ToNullable(miniBatchSize), model.Value, Optional.ToNullable(outputAction), outputFileName.Value, Optional.ToNullable(provisioningState), resources.Value, retrySettings.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs new file mode 100644 index 000000000000..8b217786c552 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchDeploymentProperties.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Batch inference settings per deployment. + /// Serialized Name: BatchDeployment + /// + public partial class MachineLearningBatchDeploymentProperties : MachineLearningEndpointDeploymentProperties + { + /// Initializes a new instance of MachineLearningBatchDeploymentProperties. + public MachineLearningBatchDeploymentProperties() + { + } + + /// Initializes a new instance of MachineLearningBatchDeploymentProperties. + /// + /// Code configuration for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.codeConfiguration + /// + /// + /// Description of the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.description + /// + /// + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentId + /// + /// + /// Environment variables configuration for the deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentVariables + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointDeploymentPropertiesBase.properties + /// + /// + /// Compute target for batch inference operation. + /// Serialized Name: BatchDeployment.compute + /// + /// + /// 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. + /// Serialized Name: BatchDeployment.errorThreshold + /// + /// + /// Logging level for batch inference operation. + /// Serialized Name: BatchDeployment.loggingLevel + /// + /// + /// Indicates maximum number of parallelism per instance. + /// Serialized Name: BatchDeployment.maxConcurrencyPerInstance + /// + /// + /// 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. + /// Serialized Name: BatchDeployment.miniBatchSize + /// + /// + /// Reference to the model asset for the endpoint deployment. + /// Serialized Name: BatchDeployment.model + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: BatchDeployment.outputAction + /// + /// + /// Customized output file name for append_row output action. + /// Serialized Name: BatchDeployment.outputFileName + /// + /// + /// Provisioning state for the endpoint deployment. + /// Serialized Name: BatchDeployment.provisioningState + /// + /// + /// Indicates compute configuration for the job. + /// If not provided, will default to the defaults defined in ResourceConfiguration. + /// Serialized Name: BatchDeployment.resources + /// + /// + /// Retry Settings for the batch inference operation. + /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// Serialized Name: BatchDeployment.retrySettings + /// + internal MachineLearningBatchDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, string compute, 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) + { + Compute = compute; + ErrorThreshold = errorThreshold; + LoggingLevel = loggingLevel; + MaxConcurrencyPerInstance = maxConcurrencyPerInstance; + MiniBatchSize = miniBatchSize; + Model = model; + OutputAction = outputAction; + OutputFileName = outputFileName; + ProvisioningState = provisioningState; + Resources = resources; + RetrySettings = retrySettings; + } + + /// + /// Compute target for batch inference operation. + /// Serialized Name: BatchDeployment.compute + /// + public string Compute { get; set; } + /// + /// 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. + /// Serialized Name: BatchDeployment.errorThreshold + /// + public int? ErrorThreshold { get; set; } + /// + /// Logging level for batch inference operation. + /// Serialized Name: BatchDeployment.loggingLevel + /// + public MachineLearningBatchLoggingLevel? LoggingLevel { get; set; } + /// + /// Indicates maximum number of parallelism per instance. + /// Serialized Name: BatchDeployment.maxConcurrencyPerInstance + /// + public int? MaxConcurrencyPerInstance { 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. + /// Serialized Name: BatchDeployment.miniBatchSize + /// + public long? MiniBatchSize { get; set; } + /// + /// Reference to the model asset for the endpoint deployment. + /// Serialized Name: BatchDeployment.model + /// Please note is the base class. According to the scenario, a derived class 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 how the output will be organized. + /// Serialized Name: BatchDeployment.outputAction + /// + public MachineLearningBatchOutputAction? OutputAction { get; set; } + /// + /// Customized output file name for append_row output action. + /// Serialized Name: BatchDeployment.outputFileName + /// + public string OutputFileName { get; set; } + /// + /// Provisioning state for the endpoint deployment. + /// Serialized Name: BatchDeployment.provisioningState + /// + public MachineLearningDeploymentProvisioningState? ProvisioningState { get; } + /// + /// Indicates compute configuration for the job. + /// If not provided, will default to the defaults defined in ResourceConfiguration. + /// Serialized Name: BatchDeployment.resources + /// + public MachineLearningDeploymentResourceConfiguration Resources { get; set; } + /// + /// Retry Settings for the batch inference operation. + /// If not provided, will default to the defaults defined in BatchRetrySettings. + /// Serialized Name: BatchDeployment.retrySettings + /// + public MachineLearningBatchRetrySettings RetrySettings { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointData.Serialization.cs new file mode 100644 index 000000000000..b6227b0ceb07 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +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 MachineLearningBatchEndpointData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"); + writer.WriteStringValue(Kind); + } + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static MachineLearningBatchEndpointData DeserializeMachineLearningBatchEndpointData(JsonElement element) + { + Optional identity = default; + Optional kind = default; + MachineLearningBatchEndpointProperties properties = default; + Optional sku = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); + continue; + } + if (property.NameEquals("kind")) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = MachineLearningBatchEndpointProperties.DeserializeMachineLearningBatchEndpointProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location")) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningBatchEndpointData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); + } + } +} 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 new file mode 100644 index 000000000000..2bd44da402d8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.Serialization.cs @@ -0,0 +1,182 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningBatchEndpointProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Defaults)) + { + if (Defaults != null) + { + writer.WritePropertyName("defaults"); + writer.WriteObjectValue(Defaults); + } + else + { + writer.WriteNull("defaults"); + } + } + writer.WritePropertyName("authMode"); + writer.WriteStringValue(AuthMode.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Keys)) + { + if (Keys != null) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + else + { + writer.WriteNull("keys"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningBatchEndpointProperties DeserializeMachineLearningBatchEndpointProperties(JsonElement element) + { + Optional defaults = default; + Optional provisioningState = default; + MachineLearningEndpointAuthMode authMode = default; + Optional description = default; + Optional keys = default; + Optional> properties = default; + Optional scoringUri = default; + Optional swaggerUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("defaults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + defaults = null; + continue; + } + defaults = BatchEndpointDefaults.DeserializeBatchEndpointDefaults(property.Value); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("authMode")) + { + authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("keys")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + keys = null; + continue; + } + keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("scoringUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scoringUri = null; + continue; + } + scoringUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("swaggerUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + swaggerUri = null; + continue; + } + swaggerUri = new Uri(property.Value.GetString()); + continue; + } + } + return new MachineLearningBatchEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value, defaults.Value, Optional.ToNullable(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 new file mode 100644 index 000000000000..d707dd3c7a80 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchEndpointProperties.cs @@ -0,0 +1,95 @@ +// 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 +{ + /// + /// Batch endpoint configuration. + /// Serialized Name: BatchEndpoint + /// + public partial class MachineLearningBatchEndpointProperties : MachineLearningEndpointProperties + { + /// Initializes a new instance of MachineLearningBatchEndpointProperties. + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + public MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode authMode) : base(authMode) + { + } + + /// Initializes a new instance of MachineLearningBatchEndpointProperties. + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + /// + /// Description of the inference endpoint. + /// Serialized Name: EndpointPropertiesBase.description + /// + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// Serialized Name: EndpointPropertiesBase.keys + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointPropertiesBase.properties + /// + /// + /// Endpoint URI. + /// Serialized Name: EndpointPropertiesBase.scoringUri + /// + /// + /// Endpoint Swagger URI. + /// Serialized Name: EndpointPropertiesBase.swaggerUri + /// + /// + /// Default values for Batch Endpoint + /// Serialized Name: BatchEndpoint.defaults + /// + /// + /// Provisioning state for the endpoint. + /// Serialized Name: BatchEndpoint.provisioningState + /// + internal MachineLearningBatchEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, BatchEndpointDefaults defaults, MachineLearningEndpointProvisioningState? provisioningState) : base(authMode, description, keys, properties, scoringUri, swaggerUri) + { + Defaults = defaults; + ProvisioningState = provisioningState; + } + + /// + /// Default values for Batch Endpoint + /// Serialized Name: BatchEndpoint.defaults + /// + internal BatchEndpointDefaults Defaults { get; set; } + /// + /// Name of the deployment that will be default for the endpoint. + /// This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. + /// Serialized Name: BatchEndpointDefaults.deploymentName + /// + public string DefaultsDeploymentName + { + get => Defaults is null ? default : Defaults.DeploymentName; + set + { + if (Defaults is null) + Defaults = new BatchEndpointDefaults(); + Defaults.DeploymentName = value; + } + } + + /// + /// Provisioning state for the endpoint. + /// Serialized Name: BatchEndpoint.provisioningState + /// + public MachineLearningEndpointProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchLoggingLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchLoggingLevel.cs new file mode 100644 index 000000000000..169f1e2f54ca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchLoggingLevel.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Log verbosity for batch inferencing. + /// Increasing verbosity order for logging is : Warning, Info and Debug. + /// The default value is Info. + /// Serialized Name: BatchLoggingLevel + /// + public readonly partial struct MachineLearningBatchLoggingLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningBatchLoggingLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfoValue = "Info"; + private const string WarningValue = "Warning"; + private const string DebugValue = "Debug"; + + /// + /// Info + /// Serialized Name: BatchLoggingLevel.Info + /// + public static MachineLearningBatchLoggingLevel Info { get; } = new MachineLearningBatchLoggingLevel(InfoValue); + /// + /// Warning + /// Serialized Name: BatchLoggingLevel.Warning + /// + public static MachineLearningBatchLoggingLevel Warning { get; } = new MachineLearningBatchLoggingLevel(WarningValue); + /// + /// Debug + /// Serialized Name: BatchLoggingLevel.Debug + /// + public static MachineLearningBatchLoggingLevel Debug { get; } = new MachineLearningBatchLoggingLevel(DebugValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningBatchLoggingLevel left, MachineLearningBatchLoggingLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningBatchLoggingLevel left, MachineLearningBatchLoggingLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningBatchLoggingLevel(string value) => new MachineLearningBatchLoggingLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningBatchLoggingLevel other && Equals(other); + /// + public bool Equals(MachineLearningBatchLoggingLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchOutputAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchOutputAction.cs new file mode 100644 index 000000000000..59f7bdaf6243 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchOutputAction.cs @@ -0,0 +1,60 @@ +// 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 how batch inferencing will handle output + /// Serialized Name: BatchOutputAction + /// + public readonly partial struct MachineLearningBatchOutputAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningBatchOutputAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SummaryOnlyValue = "SummaryOnly"; + private const string AppendRowValue = "AppendRow"; + + /// + /// SummaryOnly + /// Serialized Name: BatchOutputAction.SummaryOnly + /// + public static MachineLearningBatchOutputAction SummaryOnly { get; } = new MachineLearningBatchOutputAction(SummaryOnlyValue); + /// + /// AppendRow + /// Serialized Name: BatchOutputAction.AppendRow + /// + public static MachineLearningBatchOutputAction AppendRow { get; } = new MachineLearningBatchOutputAction(AppendRowValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningBatchOutputAction left, MachineLearningBatchOutputAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningBatchOutputAction left, MachineLearningBatchOutputAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningBatchOutputAction(string value) => new MachineLearningBatchOutputAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningBatchOutputAction other && Equals(other); + /// + public bool Equals(MachineLearningBatchOutputAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchRetrySettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchRetrySettings.Serialization.cs new file mode 100644 index 000000000000..7c874732d23a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchRetrySettings.Serialization.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningBatchRetrySettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxRetries)) + { + writer.WritePropertyName("maxRetries"); + writer.WriteNumberValue(MaxRetries.Value); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout.Value, "P"); + } + writer.WriteEndObject(); + } + + internal static MachineLearningBatchRetrySettings DeserializeMachineLearningBatchRetrySettings(JsonElement element) + { + Optional maxRetries = default; + Optional timeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxRetries")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxRetries = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + timeout = property.Value.GetTimeSpan("P"); + continue; + } + } + return new MachineLearningBatchRetrySettings(Optional.ToNullable(maxRetries), Optional.ToNullable(timeout)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchRetrySettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchRetrySettings.cs new file mode 100644 index 000000000000..9ba62493502d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBatchRetrySettings.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Retry settings for a batch inference operation. + /// Serialized Name: BatchRetrySettings + /// + public partial class MachineLearningBatchRetrySettings + { + /// Initializes a new instance of MachineLearningBatchRetrySettings. + public MachineLearningBatchRetrySettings() + { + } + + /// Initializes a new instance of MachineLearningBatchRetrySettings. + /// + /// Maximum retry count for a mini-batch + /// Serialized Name: BatchRetrySettings.maxRetries + /// + /// + /// Invocation timeout for a mini-batch, in ISO 8601 format. + /// Serialized Name: BatchRetrySettings.timeout + /// + internal MachineLearningBatchRetrySettings(int? maxRetries, TimeSpan? timeout) + { + MaxRetries = maxRetries; + Timeout = timeout; + } + + /// + /// Maximum retry count for a mini-batch + /// Serialized Name: BatchRetrySettings.maxRetries + /// + public int? MaxRetries { get; set; } + /// + /// Invocation timeout for a mini-batch, in ISO 8601 format. + /// Serialized Name: BatchRetrySettings.timeout + /// + public TimeSpan? Timeout { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBillingCurrency.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBillingCurrency.cs new file mode 100644 index 000000000000..215782150699 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBillingCurrency.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Three lettered code specifying the currency of the VM price. Example: USD + /// Serialized Name: BillingCurrency + /// + public readonly partial struct MachineLearningBillingCurrency : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningBillingCurrency(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UsdValue = "USD"; + + /// + /// USD + /// Serialized Name: BillingCurrency.USD + /// + public static MachineLearningBillingCurrency Usd { get; } = new MachineLearningBillingCurrency(UsdValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningBillingCurrency left, MachineLearningBillingCurrency right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningBillingCurrency left, MachineLearningBillingCurrency right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningBillingCurrency(string value) => new MachineLearningBillingCurrency(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningBillingCurrency other && Equals(other); + /// + public bool Equals(MachineLearningBillingCurrency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBuildContext.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBuildContext.Serialization.cs new file mode 100644 index 000000000000..0c283fc282c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBuildContext.Serialization.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningBuildContext : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("contextUri"); + writer.WriteStringValue(ContextUri.AbsoluteUri); + if (Optional.IsDefined(DockerfilePath)) + { + writer.WritePropertyName("dockerfilePath"); + writer.WriteStringValue(DockerfilePath); + } + writer.WriteEndObject(); + } + + internal static MachineLearningBuildContext DeserializeMachineLearningBuildContext(JsonElement element) + { + Uri contextUri = default; + Optional dockerfilePath = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("contextUri")) + { + contextUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("dockerfilePath")) + { + dockerfilePath = property.Value.GetString(); + continue; + } + } + return new MachineLearningBuildContext(contextUri, dockerfilePath.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBuildContext.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBuildContext.cs new file mode 100644 index 000000000000..148206bb9d2d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningBuildContext.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Configuration settings for Docker build context + /// Serialized Name: BuildContext + /// + public partial class MachineLearningBuildContext + { + /// Initializes a new instance of MachineLearningBuildContext. + /// + /// [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + /// <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" /> + /// Serialized Name: BuildContext.contextUri + /// + /// is null. + public MachineLearningBuildContext(Uri contextUri) + { + Argument.AssertNotNull(contextUri, nameof(contextUri)); + + ContextUri = contextUri; + } + + /// Initializes a new instance of MachineLearningBuildContext. + /// + /// [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + /// <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" /> + /// Serialized Name: BuildContext.contextUri + /// + /// + /// Path to the Dockerfile in the build context. + /// <seealso href="https://docs.docker.com/engine/reference/builder/" /> + /// Serialized Name: BuildContext.dockerfilePath + /// + internal MachineLearningBuildContext(Uri contextUri, string dockerfilePath) + { + ContextUri = contextUri; + DockerfilePath = dockerfilePath; + } + + /// + /// [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + /// <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" /> + /// Serialized Name: BuildContext.contextUri + /// + public Uri ContextUri { get; set; } + /// + /// Path to the Dockerfile in the build context. + /// <seealso href="https://docs.docker.com/engine/reference/builder/" /> + /// Serialized Name: BuildContext.dockerfilePath + /// + public string DockerfilePath { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCachingType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCachingType.cs new file mode 100644 index 000000000000..e65ef801964d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCachingType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Caching type of Data Disk. + /// Serialized Name: Caching + /// + public readonly partial struct MachineLearningCachingType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningCachingType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string ReadOnlyValue = "ReadOnly"; + private const string ReadWriteValue = "ReadWrite"; + + /// + /// None + /// Serialized Name: Caching.None + /// + public static MachineLearningCachingType None { get; } = new MachineLearningCachingType(NoneValue); + /// + /// ReadOnly + /// Serialized Name: Caching.ReadOnly + /// + public static MachineLearningCachingType ReadOnly { get; } = new MachineLearningCachingType(ReadOnlyValue); + /// + /// ReadWrite + /// Serialized Name: Caching.ReadWrite + /// + public static MachineLearningCachingType ReadWrite { get; } = new MachineLearningCachingType(ReadWriteValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningCachingType left, MachineLearningCachingType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningCachingType left, MachineLearningCachingType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningCachingType(string value) => new MachineLearningCachingType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningCachingType other && Equals(other); + /// + public bool Equals(MachineLearningCachingType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..2816d4efd3f0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCertificateDatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AuthorityUri)) + { + if (AuthorityUri != null) + { + writer.WritePropertyName("authorityUrl"); + writer.WriteStringValue(AuthorityUri.AbsoluteUri); + } + else + { + writer.WriteNull("authorityUrl"); + } + } + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId); + if (Optional.IsDefined(ResourceUri)) + { + if (ResourceUri != null) + { + writer.WritePropertyName("resourceUrl"); + writer.WriteStringValue(ResourceUri.AbsoluteUri); + } + else + { + writer.WriteNull("resourceUrl"); + } + } + writer.WritePropertyName("secrets"); + writer.WriteObjectValue(Secrets); + writer.WritePropertyName("tenantId"); + writer.WriteStringValue(TenantId); + writer.WritePropertyName("thumbprint"); + writer.WriteStringValue(Thumbprint); + writer.WritePropertyName("credentialsType"); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningCertificateDatastoreCredentials DeserializeMachineLearningCertificateDatastoreCredentials(JsonElement element) + { + Optional authorityUrl = default; + Guid clientId = default; + Optional resourceUrl = default; + MachineLearningCertificateDatastoreSecrets secrets = default; + Guid tenantId = default; + string thumbprint = default; + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorityUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + authorityUrl = null; + continue; + } + authorityUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("resourceUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceUrl = null; + continue; + } + resourceUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("secrets")) + { + secrets = MachineLearningCertificateDatastoreSecrets.DeserializeMachineLearningCertificateDatastoreSecrets(property.Value); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("thumbprint")) + { + thumbprint = property.Value.GetString(); + continue; + } + if (property.NameEquals("credentialsType")) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningCertificateDatastoreCredentials(credentialsType, authorityUrl.Value, clientId, resourceUrl.Value, secrets, tenantId, thumbprint); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs new file mode 100644 index 000000000000..f0dcecab0588 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreCredentials.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Certificate datastore credentials configuration. + /// Serialized Name: CertificateDatastoreCredentials + /// + public partial class MachineLearningCertificateDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of MachineLearningCertificateDatastoreCredentials. + /// + /// [Required] Service principal client ID. + /// Serialized Name: CertificateDatastoreCredentials.clientId + /// + /// + /// [Required] Service principal secrets. + /// Serialized Name: CertificateDatastoreCredentials.secrets + /// + /// + /// [Required] ID of the tenant to which the service principal belongs. + /// Serialized Name: CertificateDatastoreCredentials.tenantId + /// + /// + /// [Required] Thumbprint of the certificate used for authentication. + /// Serialized Name: CertificateDatastoreCredentials.thumbprint + /// + /// or is null. + public MachineLearningCertificateDatastoreCredentials(Guid clientId, MachineLearningCertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + Argument.AssertNotNull(thumbprint, nameof(thumbprint)); + + ClientId = clientId; + Secrets = secrets; + TenantId = tenantId; + Thumbprint = thumbprint; + CredentialsType = CredentialsType.Certificate; + } + + /// Initializes a new instance of MachineLearningCertificateDatastoreCredentials. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + /// + /// Authority URL used for authentication. + /// Serialized Name: CertificateDatastoreCredentials.authorityUrl + /// + /// + /// [Required] Service principal client ID. + /// Serialized Name: CertificateDatastoreCredentials.clientId + /// + /// + /// Resource the service principal has access to. + /// Serialized Name: CertificateDatastoreCredentials.resourceUrl + /// + /// + /// [Required] Service principal secrets. + /// Serialized Name: CertificateDatastoreCredentials.secrets + /// + /// + /// [Required] ID of the tenant to which the service principal belongs. + /// Serialized Name: CertificateDatastoreCredentials.tenantId + /// + /// + /// [Required] Thumbprint of the certificate used for authentication. + /// Serialized Name: CertificateDatastoreCredentials.thumbprint + /// + internal MachineLearningCertificateDatastoreCredentials(CredentialsType credentialsType, Uri authorityUri, Guid clientId, Uri resourceUri, MachineLearningCertificateDatastoreSecrets secrets, Guid tenantId, string thumbprint) : base(credentialsType) + { + AuthorityUri = authorityUri; + ClientId = clientId; + ResourceUri = resourceUri; + Secrets = secrets; + TenantId = tenantId; + Thumbprint = thumbprint; + CredentialsType = credentialsType; + } + + /// + /// Authority URL used for authentication. + /// Serialized Name: CertificateDatastoreCredentials.authorityUrl + /// + public Uri AuthorityUri { get; set; } + /// + /// [Required] Service principal client ID. + /// Serialized Name: CertificateDatastoreCredentials.clientId + /// + public Guid ClientId { get; set; } + /// + /// Resource the service principal has access to. + /// Serialized Name: CertificateDatastoreCredentials.resourceUrl + /// + public Uri ResourceUri { get; set; } + /// + /// [Required] Service principal secrets. + /// Serialized Name: CertificateDatastoreCredentials.secrets + /// + public MachineLearningCertificateDatastoreSecrets Secrets { get; set; } + /// + /// [Required] ID of the tenant to which the service principal belongs. + /// Serialized Name: CertificateDatastoreCredentials.tenantId + /// + public Guid TenantId { get; set; } + /// + /// [Required] Thumbprint of the certificate used for authentication. + /// Serialized Name: CertificateDatastoreCredentials.thumbprint + /// + public string Thumbprint { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreSecrets.Serialization.cs new file mode 100644 index 000000000000..02eb2190a78a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreSecrets.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCertificateDatastoreSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Certificate)) + { + if (Certificate != null) + { + writer.WritePropertyName("certificate"); + writer.WriteStringValue(Certificate); + } + else + { + writer.WriteNull("certificate"); + } + } + writer.WritePropertyName("secretsType"); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningCertificateDatastoreSecrets DeserializeMachineLearningCertificateDatastoreSecrets(JsonElement element) + { + Optional certificate = default; + SecretsType secretsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("certificate")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + certificate = null; + continue; + } + certificate = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretsType")) + { + secretsType = new SecretsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningCertificateDatastoreSecrets(secretsType, certificate.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreSecrets.cs new file mode 100644 index 000000000000..2ad8f6a5069d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCertificateDatastoreSecrets.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Datastore certificate secrets. + /// Serialized Name: CertificateDatastoreSecrets + /// + public partial class MachineLearningCertificateDatastoreSecrets : MachineLearningDatastoreSecrets + { + /// Initializes a new instance of MachineLearningCertificateDatastoreSecrets. + public MachineLearningCertificateDatastoreSecrets() + { + SecretsType = SecretsType.Certificate; + } + + /// Initializes a new instance of MachineLearningCertificateDatastoreSecrets. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// + /// + /// Service principal certificate. + /// Serialized Name: CertificateDatastoreSecrets.certificate + /// + internal MachineLearningCertificateDatastoreSecrets(SecretsType secretsType, string certificate) : base(secretsType) + { + Certificate = certificate; + SecretsType = secretsType; + } + + /// + /// Service principal certificate. + /// Serialized Name: CertificateDatastoreSecrets.certificate + /// + public string Certificate { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningClusterPurpose.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningClusterPurpose.cs new file mode 100644 index 000000000000..fa535feff819 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningClusterPurpose.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Intended usage of the cluster + /// Serialized Name: ClusterPurpose + /// + public readonly partial struct MachineLearningClusterPurpose : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningClusterPurpose(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FastProdValue = "FastProd"; + private const string DenseProdValue = "DenseProd"; + private const string DevTestValue = "DevTest"; + + /// + /// FastProd + /// Serialized Name: ClusterPurpose.FastProd + /// + public static MachineLearningClusterPurpose FastProd { get; } = new MachineLearningClusterPurpose(FastProdValue); + /// + /// DenseProd + /// Serialized Name: ClusterPurpose.DenseProd + /// + public static MachineLearningClusterPurpose DenseProd { get; } = new MachineLearningClusterPurpose(DenseProdValue); + /// + /// DevTest + /// Serialized Name: ClusterPurpose.DevTest + /// + public static MachineLearningClusterPurpose DevTest { get; } = new MachineLearningClusterPurpose(DevTestValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningClusterPurpose left, MachineLearningClusterPurpose right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningClusterPurpose left, MachineLearningClusterPurpose right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningClusterPurpose(string value) => new MachineLearningClusterPurpose(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningClusterPurpose other && Equals(other); + /// + public bool Equals(MachineLearningClusterPurpose other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.Serialization.cs new file mode 100644 index 000000000000..79275de7ff5c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class MachineLearningCmkIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(UserAssignedIdentity)) + { + writer.WritePropertyName("userAssignedIdentity"); + writer.WriteStringValue(UserAssignedIdentity); + } + writer.WriteEndObject(); + } + + internal static MachineLearningCmkIdentity DeserializeMachineLearningCmkIdentity(JsonElement element) + { + Optional userAssignedIdentity = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userAssignedIdentity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + userAssignedIdentity = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new MachineLearningCmkIdentity(userAssignedIdentity.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs new file mode 100644 index 000000000000..d45984301170 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCmkIdentity.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Identity that will be used to access key vault for encryption at rest + /// Serialized Name: IdentityForCmk + /// + internal partial class MachineLearningCmkIdentity + { + /// Initializes a new instance of MachineLearningCmkIdentity. + public MachineLearningCmkIdentity() + { + } + + /// Initializes a new instance of MachineLearningCmkIdentity. + /// + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault + /// Serialized Name: IdentityForCmk.userAssignedIdentity + /// + internal MachineLearningCmkIdentity(ResourceIdentifier userAssignedIdentity) + { + UserAssignedIdentity = userAssignedIdentity; + } + + /// + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault + /// Serialized Name: IdentityForCmk.userAssignedIdentity + /// + public ResourceIdentifier UserAssignedIdentity { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeConfiguration.Serialization.cs new file mode 100644 index 000000000000..ab701117bee4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeConfiguration.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCodeConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeId)) + { + if (CodeId != null) + { + writer.WritePropertyName("codeId"); + writer.WriteStringValue(CodeId); + } + else + { + writer.WriteNull("codeId"); + } + } + writer.WritePropertyName("scoringScript"); + writer.WriteStringValue(ScoringScript); + writer.WriteEndObject(); + } + + internal static MachineLearningCodeConfiguration DeserializeMachineLearningCodeConfiguration(JsonElement element) + { + Optional codeId = default; + string scoringScript = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeId = null; + continue; + } + codeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("scoringScript")) + { + scoringScript = property.Value.GetString(); + continue; + } + } + return new MachineLearningCodeConfiguration(codeId.Value, scoringScript); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeConfiguration.cs new file mode 100644 index 000000000000..50fbdc20d70e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeConfiguration.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Configuration for a scoring code asset. + /// Serialized Name: CodeConfiguration + /// + public partial class MachineLearningCodeConfiguration + { + /// Initializes a new instance of MachineLearningCodeConfiguration. + /// + /// [Required] The script to execute on startup. eg. "score.py" + /// Serialized Name: CodeConfiguration.scoringScript + /// + /// is null. + public MachineLearningCodeConfiguration(string scoringScript) + { + Argument.AssertNotNull(scoringScript, nameof(scoringScript)); + + ScoringScript = scoringScript; + } + + /// Initializes a new instance of MachineLearningCodeConfiguration. + /// + /// ARM resource ID of the code asset. + /// Serialized Name: CodeConfiguration.codeId + /// + /// + /// [Required] The script to execute on startup. eg. "score.py" + /// Serialized Name: CodeConfiguration.scoringScript + /// + internal MachineLearningCodeConfiguration(string codeId, string scoringScript) + { + CodeId = codeId; + ScoringScript = scoringScript; + } + + /// + /// ARM resource ID of the code asset. + /// Serialized Name: CodeConfiguration.codeId + /// + public string CodeId { get; set; } + /// + /// [Required] The script to execute on startup. eg. "score.py" + /// Serialized Name: CodeConfiguration.scoringScript + /// + public string ScoringScript { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerData.Serialization.cs new file mode 100644 index 000000000000..96493b262ee1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningCodeContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningCodeContainerData DeserializeMachineLearningCodeContainerData(JsonElement element) + { + MachineLearningCodeContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningCodeContainerProperties.DeserializeMachineLearningCodeContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningCodeContainerData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..8e2de6ed7f6b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCodeContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningCodeContainerProperties DeserializeMachineLearningCodeContainerProperties(JsonElement element) + { + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningCodeContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs new file mode 100644 index 000000000000..4084fc240312 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeContainerProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Container for code asset versions. + /// Serialized Name: CodeContainer + /// + public partial class MachineLearningCodeContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningCodeContainerProperties. + public MachineLearningCodeContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningCodeContainerProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + internal MachineLearningCodeContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionData.Serialization.cs new file mode 100644 index 000000000000..6ad88acbc1ea --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningCodeVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningCodeVersionData DeserializeMachineLearningCodeVersionData(JsonElement element) + { + MachineLearningCodeVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningCodeVersionProperties.DeserializeMachineLearningCodeVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningCodeVersionData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..da4da38db645 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.Serialization.cs @@ -0,0 +1,191 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCodeVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeUri)) + { + if (CodeUri != null) + { + writer.WritePropertyName("codeUri"); + writer.WriteStringValue(CodeUri.AbsoluteUri); + } + else + { + writer.WriteNull("codeUri"); + } + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningCodeVersionProperties DeserializeMachineLearningCodeVersionProperties(JsonElement element) + { + Optional codeUri = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeUri = null; + continue; + } + codeUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningCodeVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), codeUri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs new file mode 100644 index 000000000000..918e7f565e81 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCodeVersionProperties.cs @@ -0,0 +1,60 @@ +// 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 +{ + /// + /// Code asset version details. + /// Serialized Name: CodeVersion + /// + public partial class MachineLearningCodeVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningCodeVersionProperties. + public MachineLearningCodeVersionProperties() + { + } + + /// Initializes a new instance of MachineLearningCodeVersionProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// Uri where code is located + /// Serialized Name: CodeVersion.codeUri + /// + internal MachineLearningCodeVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, Uri codeUri) : base(description, properties, tags, isAnonymous, isArchived) + { + CodeUri = codeUri; + } + + /// + /// Uri where code is located + /// Serialized Name: CodeVersion.codeUri + /// + public Uri CodeUri { get; set; } + } +} 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 new file mode 100644 index 000000000000..f57e690cfef3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.Serialization.cs @@ -0,0 +1,550 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCommandJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeId)) + { + if (CodeId != null) + { + writer.WritePropertyName("codeId"); + writer.WriteStringValue(CodeId); + } + else + { + writer.WriteNull("codeId"); + } + } + writer.WritePropertyName("command"); + writer.WriteStringValue(Command); + if (Optional.IsDefined(Distribution)) + { + if (Distribution != null) + { + writer.WritePropertyName("distribution"); + writer.WriteObjectValue(Distribution); + } + else + { + writer.WriteNull("distribution"); + } + } + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs != null) + { + writer.WritePropertyName("inputs"); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputs"); + } + } + if (Optional.IsDefined(Limits)) + { + if (Limits != null) + { + writer.WritePropertyName("limits"); + writer.WriteObjectValue(Limits); + } + else + { + writer.WriteNull("limits"); + } + } + if (Optional.IsCollectionDefined(Outputs)) + { + if (Outputs != null) + { + writer.WritePropertyName("outputs"); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("outputs"); + } + } + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"); + writer.WriteObjectValue(Resources); + } + if (Optional.IsDefined(ComponentId)) + { + if (ComponentId != null) + { + writer.WritePropertyName("componentId"); + writer.WriteStringValue(ComponentId); + } + else + { + writer.WriteNull("componentId"); + } + } + if (Optional.IsDefined(ComputeId)) + { + if (ComputeId != null) + { + writer.WritePropertyName("computeId"); + writer.WriteStringValue(ComputeId); + } + else + { + writer.WriteNull("computeId"); + } + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsDefined(Identity)) + { + if (Identity != null) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + else + { + writer.WriteNull("identity"); + } + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) + { + writer.WritePropertyName("services"); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("services"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningCommandJob DeserializeMachineLearningCommandJob(JsonElement element) + { + Optional codeId = default; + string command = default; + Optional distribution = default; + string environmentId = default; + Optional> environmentVariables = default; + Optional> inputs = default; + Optional limits = default; + Optional> outputs = default; + Optional parameters = default; + Optional resources = default; + Optional componentId = default; + Optional computeId = default; + Optional displayName = default; + Optional experimentName = default; + Optional identity = default; + Optional isArchived = default; + JobType jobType = default; + Optional> services = default; + Optional status = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeId = null; + continue; + } + codeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("command")) + { + command = property.Value.GetString(); + continue; + } + if (property.NameEquals("distribution")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + distribution = null; + continue; + } + distribution = MachineLearningDistributionConfiguration.DeserializeMachineLearningDistributionConfiguration(property.Value); + continue; + } + if (property.NameEquals("environmentId")) + { + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = 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, property0.Value.GetString()); + } + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("inputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputs = 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, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value)); + } + } + inputs = dictionary; + continue; + } + if (property.NameEquals("limits")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + limits = null; + continue; + } + limits = MachineLearningCommandJobLimits.DeserializeMachineLearningCommandJobLimits(property.Value); + continue; + } + if (property.NameEquals("outputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputs = 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, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value)); + } + } + outputs = dictionary; + continue; + } + if (property.NameEquals("parameters")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + parameters = null; + continue; + } + parameters = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("resources")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value); + continue; + } + if (property.NameEquals("componentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentId = null; + continue; + } + componentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + computeId = null; + continue; + } + computeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + identity = null; + continue; + } + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("services")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + services = 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, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); + } + } + services = dictionary; + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningCommandJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), codeId.Value, command, distribution.Value, environmentId, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(inputs), limits.Value, Optional.ToDictionary(outputs), parameters.Value, resources.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs new file mode 100644 index 000000000000..3cf9577351ec --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJob.cs @@ -0,0 +1,241 @@ +// 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 +{ + /// + /// Command job definition. + /// Serialized Name: CommandJob + /// + public partial class MachineLearningCommandJob : MachineLearningJobProperties + { + /// Initializes a new instance of MachineLearningCommandJob. + /// + /// [Required] The command to execute on startup of the job. eg. "python train.py" + /// Serialized Name: CommandJob.command + /// + /// + /// [Required] The ARM resource ID of the Environment specification for the job. + /// Serialized Name: CommandJob.environmentId + /// + /// or is null. + public MachineLearningCommandJob(string command, string environmentId) + { + Argument.AssertNotNull(command, nameof(command)); + Argument.AssertNotNull(environmentId, nameof(environmentId)); + + Command = command; + EnvironmentId = environmentId; + EnvironmentVariables = new ChangeTrackingDictionary(); + Inputs = new ChangeTrackingDictionary(); + Outputs = new ChangeTrackingDictionary(); + JobType = JobType.Command; + } + + /// Initializes a new instance of MachineLearningCommandJob. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// ARM resource ID of the component resource. + /// Serialized Name: JobBase.componentId + /// + /// + /// ARM resource ID of the compute resource. + /// Serialized Name: JobBase.computeId + /// + /// + /// Display name of job. + /// Serialized Name: JobBase.displayName + /// + /// + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Serialized Name: JobBase.experimentName + /// + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Serialized Name: JobBase.identity + /// Please note is the base class. According to the scenario, a derived class 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? + /// Serialized Name: JobBase.isArchived + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobBase.jobType + /// + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// Serialized Name: JobBase.services + /// + /// + /// Status of the job. + /// Serialized Name: JobBase.status + /// + /// + /// ARM resource ID of the code asset. + /// Serialized Name: CommandJob.codeId + /// + /// + /// [Required] The command to execute on startup of the job. eg. "python train.py" + /// Serialized Name: CommandJob.command + /// + /// + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Serialized Name: CommandJob.distribution + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: CommandJob.environmentId + /// + /// + /// Environment variables included in the job. + /// Serialized Name: CommandJob.environmentVariables + /// + /// + /// Mapping of input data bindings used in the job. + /// Serialized Name: CommandJob.inputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: CommandJob.limits + /// + /// + /// Mapping of output data bindings used in the job. + /// Serialized Name: CommandJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: CommandJob.parameters + /// + /// + /// Compute Resource configuration for the job. + /// Serialized Name: CommandJob.resources + /// + internal MachineLearningCommandJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, string codeId, string command, MachineLearningDistributionConfiguration distribution, string environmentId, IDictionary environmentVariables, IDictionary inputs, MachineLearningCommandJobLimits limits, IDictionary outputs, BinaryData parameters, MachineLearningJobResourceConfiguration resources) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + { + CodeId = codeId; + Command = command; + Distribution = distribution; + EnvironmentId = environmentId; + EnvironmentVariables = environmentVariables; + Inputs = inputs; + Limits = limits; + Outputs = outputs; + Parameters = parameters; + Resources = resources; + JobType = jobType; + } + + /// + /// ARM resource ID of the code asset. + /// Serialized Name: CommandJob.codeId + /// + public string CodeId { get; set; } + /// + /// [Required] The command to execute on startup of the job. eg. "python train.py" + /// Serialized Name: CommandJob.command + /// + public string Command { get; set; } + /// + /// Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null. + /// Serialized Name: CommandJob.distribution + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: CommandJob.environmentId + /// + public string EnvironmentId { get; set; } + /// + /// Environment variables included in the job. + /// Serialized Name: CommandJob.environmentVariables + /// + public IDictionary EnvironmentVariables { get; set; } + /// + /// Mapping of input data bindings used in the job. + /// Serialized Name: CommandJob.inputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: CommandJob.limits + /// + public MachineLearningCommandJobLimits Limits { get; set; } + /// + /// Mapping of output data bindings used in the job. + /// Serialized Name: CommandJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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; } + /// + /// Input parameters. + /// Serialized Name: CommandJob.parameters + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated 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 Parameters { get; } + /// + /// Compute Resource configuration for the job. + /// Serialized Name: CommandJob.resources + /// + public MachineLearningJobResourceConfiguration Resources { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJobLimits.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJobLimits.Serialization.cs new file mode 100644 index 000000000000..d8eac1394603 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJobLimits.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCommandJobLimits : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobLimitsType"); + writer.WriteStringValue(JobLimitsType.ToString()); + if (Optional.IsDefined(Timeout)) + { + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout.Value, "P"); + } + else + { + writer.WriteNull("timeout"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningCommandJobLimits DeserializeMachineLearningCommandJobLimits(JsonElement element) + { + JobLimitsType jobLimitsType = default; + Optional timeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobLimitsType")) + { + jobLimitsType = new JobLimitsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + timeout = null; + continue; + } + timeout = property.Value.GetTimeSpan("P"); + continue; + } + } + return new MachineLearningCommandJobLimits(jobLimitsType, Optional.ToNullable(timeout)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJobLimits.cs new file mode 100644 index 000000000000..20738141a575 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCommandJobLimits.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Command Job limit class. + /// Serialized Name: CommandJobLimits + /// + public partial class MachineLearningCommandJobLimits : MachineLearningJobLimits + { + /// Initializes a new instance of MachineLearningCommandJobLimits. + public MachineLearningCommandJobLimits() + { + JobLimitsType = JobLimitsType.Command; + } + + /// Initializes a new instance of MachineLearningCommandJobLimits. + /// + /// [Required] JobLimit type. + /// Serialized Name: JobLimits.jobLimitsType + /// + /// + /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. + /// Serialized Name: JobLimits.timeout + /// + internal MachineLearningCommandJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout) : base(jobLimitsType, timeout) + { + JobLimitsType = jobLimitsType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerData.Serialization.cs new file mode 100644 index 000000000000..65fbd3c37c09 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningComponentContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningComponentContainerData DeserializeMachineLearningComponentContainerData(JsonElement element) + { + MachineLearningComponentContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningComponentContainerProperties.DeserializeMachineLearningComponentContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningComponentContainerData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..a4bddce8617b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComponentContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningComponentContainerProperties DeserializeMachineLearningComponentContainerProperties(JsonElement element) + { + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningComponentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs new file mode 100644 index 000000000000..0f95dbba3cd4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentContainerProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Component container definition. + /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> + /// Serialized Name: ComponentContainer + /// + public partial class MachineLearningComponentContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningComponentContainerProperties. + public MachineLearningComponentContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningComponentContainerProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + internal MachineLearningComponentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionData.Serialization.cs new file mode 100644 index 000000000000..4c5570c20eb4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningComponentVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningComponentVersionData DeserializeMachineLearningComponentVersionData(JsonElement element) + { + MachineLearningComponentVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningComponentVersionProperties.DeserializeMachineLearningComponentVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningComponentVersionData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..ac8ef3e73383 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.Serialization.cs @@ -0,0 +1,195 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComponentVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ComponentSpec)) + { + if (ComponentSpec != null) + { + writer.WritePropertyName("componentSpec"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(ComponentSpec); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(ComponentSpec.ToString()).RootElement); +#endif + } + else + { + writer.WriteNull("componentSpec"); + } + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningComponentVersionProperties DeserializeMachineLearningComponentVersionProperties(JsonElement element) + { + Optional componentSpec = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("componentSpec")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentSpec = null; + continue; + } + componentSpec = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningComponentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), componentSpec.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs new file mode 100644 index 000000000000..dace43ac8951 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComponentVersionProperties.cs @@ -0,0 +1,89 @@ +// 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 +{ + /// + /// Definition of a component version: defines resources that span component types. + /// Serialized Name: ComponentVersion + /// + public partial class MachineLearningComponentVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningComponentVersionProperties. + public MachineLearningComponentVersionProperties() + { + } + + /// Initializes a new instance of MachineLearningComponentVersionProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// Defines Component definition details. + /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> + /// Serialized Name: ComponentVersion.componentSpec + /// + internal MachineLearningComponentVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, BinaryData componentSpec) : base(description, properties, tags, isAnonymous, isArchived) + { + ComponentSpec = componentSpec; + } + + /// + /// Defines Component definition details. + /// <see href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" /> + /// Serialized Name: ComponentVersion.componentSpec + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated 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 ComponentSpec { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeData.Serialization.cs index 6a84ded3fe2d..8eac2223d699 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeData.Serialization.cs @@ -61,7 +61,7 @@ internal static MachineLearningComputeData DeserializeMachineLearningComputeData { Optional identity = default; Optional sku = default; - Optional properties = default; + Optional properties = default; Optional> tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -98,7 +98,7 @@ internal static MachineLearningComputeData DeserializeMachineLearningComputeData property.ThrowNonNullablePropertyIsNull(); continue; } - properties = Compute.DeserializeCompute(property.Value); + properties = MachineLearningComputeProperties.DeserializeMachineLearningComputeProperties(property.Value); continue; } if (property.NameEquals("tags")) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstance.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstance.Serialization.cs new file mode 100644 index 000000000000..af3a305336c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstance.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstance : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningComputeInstance DeserializeMachineLearningComputeInstance(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningComputeInstanceProperties.DeserializeMachineLearningComputeInstanceProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningComputeInstance(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstance.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstance.cs new file mode 100644 index 000000000000..6dde254374bd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstance.cs @@ -0,0 +1,83 @@ +// 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 +{ + /// + /// An Azure Machine Learning compute instance. + /// Serialized Name: ComputeInstance + /// + public partial class MachineLearningComputeInstance : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningComputeInstance. + public MachineLearningComputeInstance() + { + ComputeType = ComputeType.ComputeInstance; + } + + /// Initializes a new instance of MachineLearningComputeInstance. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// + /// Properties of ComputeInstance + /// Serialized Name: ComputeInstanceSchema.properties + /// + internal MachineLearningComputeInstance(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningComputeInstanceProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// + /// Properties of ComputeInstance + /// Serialized Name: ComputeInstanceSchema.properties + /// + public MachineLearningComputeInstanceProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceApplication.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceApplication.Serialization.cs new file mode 100644 index 000000000000..f8903b0bc5b1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceApplication.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceApplication + { + internal static MachineLearningComputeInstanceApplication DeserializeMachineLearningComputeInstanceApplication(JsonElement element) + { + Optional displayName = default; + Optional endpointUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("displayName")) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endpointUri = null; + continue; + } + endpointUri = new Uri(property.Value.GetString()); + continue; + } + } + return new MachineLearningComputeInstanceApplication(displayName.Value, endpointUri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceApplication.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceApplication.cs new file mode 100644 index 000000000000..110093add93c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceApplication.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Defines an Aml Instance application and its connectivity endpoint URI. + /// Serialized Name: ComputeInstanceApplication + /// + public partial class MachineLearningComputeInstanceApplication + { + /// Initializes a new instance of MachineLearningComputeInstanceApplication. + internal MachineLearningComputeInstanceApplication() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceApplication. + /// + /// Name of the ComputeInstance application. + /// Serialized Name: ComputeInstanceApplication.displayName + /// + /// + /// Application' endpoint URI. + /// Serialized Name: ComputeInstanceApplication.endpointUri + /// + internal MachineLearningComputeInstanceApplication(string displayName, Uri endpointUri) + { + DisplayName = displayName; + EndpointUri = endpointUri; + } + + /// + /// Name of the ComputeInstance application. + /// Serialized Name: ComputeInstanceApplication.displayName + /// + public string DisplayName { get; } + /// + /// Application' endpoint URI. + /// Serialized Name: ComputeInstanceApplication.endpointUri + /// + public Uri EndpointUri { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAssignedUser.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAssignedUser.Serialization.cs new file mode 100644 index 000000000000..7e1f2b0f46e1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAssignedUser.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceAssignedUser : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("objectId"); + writer.WriteStringValue(ObjectId); + writer.WritePropertyName("tenantId"); + writer.WriteStringValue(TenantId); + writer.WriteEndObject(); + } + + internal static MachineLearningComputeInstanceAssignedUser DeserializeMachineLearningComputeInstanceAssignedUser(JsonElement element) + { + string objectId = default; + Guid tenantId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("objectId")) + { + objectId = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetGuid(); + continue; + } + } + return new MachineLearningComputeInstanceAssignedUser(objectId, tenantId); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAssignedUser.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAssignedUser.cs new file mode 100644 index 000000000000..d4ab6967f6d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAssignedUser.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// A user that can be assigned to a compute instance. + /// Serialized Name: AssignedUser + /// + public partial class MachineLearningComputeInstanceAssignedUser + { + /// Initializes a new instance of MachineLearningComputeInstanceAssignedUser. + /// + /// User’s AAD Object Id. + /// Serialized Name: AssignedUser.objectId + /// + /// + /// User’s AAD Tenant Id. + /// Serialized Name: AssignedUser.tenantId + /// + /// is null. + public MachineLearningComputeInstanceAssignedUser(string objectId, Guid tenantId) + { + Argument.AssertNotNull(objectId, nameof(objectId)); + + ObjectId = objectId; + TenantId = tenantId; + } + + /// + /// User’s AAD Object Id. + /// Serialized Name: AssignedUser.objectId + /// + public string ObjectId { get; set; } + /// + /// User’s AAD Tenant Id. + /// Serialized Name: AssignedUser.tenantId + /// + public Guid TenantId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAuthorizationType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAuthorizationType.cs new file mode 100644 index 000000000000..323cf0512003 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAuthorizationType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The Compute Instance Authorization type. Available values are personal (default). + /// Serialized Name: ComputeInstanceAuthorizationType + /// + public readonly partial struct MachineLearningComputeInstanceAuthorizationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningComputeInstanceAuthorizationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PersonalValue = "personal"; + + /// + /// personal + /// Serialized Name: ComputeInstanceAuthorizationType.personal + /// + public static MachineLearningComputeInstanceAuthorizationType Personal { get; } = new MachineLearningComputeInstanceAuthorizationType(PersonalValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningComputeInstanceAuthorizationType left, MachineLearningComputeInstanceAuthorizationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningComputeInstanceAuthorizationType left, MachineLearningComputeInstanceAuthorizationType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningComputeInstanceAuthorizationType(string value) => new MachineLearningComputeInstanceAuthorizationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningComputeInstanceAuthorizationType other && Equals(other); + /// + public bool Equals(MachineLearningComputeInstanceAuthorizationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAutosave.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAutosave.cs new file mode 100644 index 000000000000..845593f8287a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceAutosave.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Auto save settings. + /// Serialized Name: Autosave + /// + public readonly partial struct MachineLearningComputeInstanceAutosave : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningComputeInstanceAutosave(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string LocalValue = "Local"; + private const string RemoteValue = "Remote"; + + /// + /// None + /// Serialized Name: Autosave.None + /// + public static MachineLearningComputeInstanceAutosave None { get; } = new MachineLearningComputeInstanceAutosave(NoneValue); + /// + /// Local + /// Serialized Name: Autosave.Local + /// + public static MachineLearningComputeInstanceAutosave Local { get; } = new MachineLearningComputeInstanceAutosave(LocalValue); + /// + /// Remote + /// Serialized Name: Autosave.Remote + /// + public static MachineLearningComputeInstanceAutosave Remote { get; } = new MachineLearningComputeInstanceAutosave(RemoteValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningComputeInstanceAutosave left, MachineLearningComputeInstanceAutosave right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningComputeInstanceAutosave left, MachineLearningComputeInstanceAutosave right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningComputeInstanceAutosave(string value) => new MachineLearningComputeInstanceAutosave(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningComputeInstanceAutosave other && Equals(other); + /// + public bool Equals(MachineLearningComputeInstanceAutosave other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceConnectivityEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceConnectivityEndpoints.Serialization.cs new file mode 100644 index 000000000000..ae0127ad5272 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceConnectivityEndpoints.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceConnectivityEndpoints + { + internal static MachineLearningComputeInstanceConnectivityEndpoints DeserializeMachineLearningComputeInstanceConnectivityEndpoints(JsonElement element) + { + Optional publicIPAddress = default; + Optional privateIPAddress = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publicIpAddress")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + publicIPAddress = null; + continue; + } + publicIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateIpAddress")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + privateIPAddress = null; + continue; + } + privateIPAddress = property.Value.GetString(); + continue; + } + } + return new MachineLearningComputeInstanceConnectivityEndpoints(publicIPAddress.Value, privateIPAddress.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceConnectivityEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceConnectivityEndpoints.cs new file mode 100644 index 000000000000..45796965f909 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceConnectivityEndpoints.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Defines all connectivity endpoints and properties for an ComputeInstance. + /// Serialized Name: ComputeInstanceConnectivityEndpoints + /// + public partial class MachineLearningComputeInstanceConnectivityEndpoints + { + /// Initializes a new instance of MachineLearningComputeInstanceConnectivityEndpoints. + internal MachineLearningComputeInstanceConnectivityEndpoints() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceConnectivityEndpoints. + /// + /// Public IP Address of this ComputeInstance. + /// Serialized Name: ComputeInstanceConnectivityEndpoints.publicIpAddress + /// + /// + /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). + /// Serialized Name: ComputeInstanceConnectivityEndpoints.privateIpAddress + /// + internal MachineLearningComputeInstanceConnectivityEndpoints(string publicIPAddress, string privateIPAddress) + { + PublicIPAddress = publicIPAddress; + PrivateIPAddress = privateIPAddress; + } + + /// + /// Public IP Address of this ComputeInstance. + /// Serialized Name: ComputeInstanceConnectivityEndpoints.publicIpAddress + /// + public string PublicIPAddress { get; } + /// + /// Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed). + /// Serialized Name: ComputeInstanceConnectivityEndpoints.privateIpAddress + /// + public string PrivateIPAddress { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceContainer.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceContainer.Serialization.cs new file mode 100644 index 000000000000..401947a70223 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceContainer.Serialization.cs @@ -0,0 +1,86 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceContainer + { + internal static MachineLearningComputeInstanceContainer DeserializeMachineLearningComputeInstanceContainer(JsonElement element) + { + Optional name = default; + Optional autosave = default; + Optional gpu = default; + Optional network = default; + Optional environment = default; + Optional> services = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("autosave")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autosave = new MachineLearningComputeInstanceAutosave(property.Value.GetString()); + continue; + } + if (property.NameEquals("gpu")) + { + gpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("network")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + network = new MachineLearningNetwork(property.Value.GetString()); + continue; + } + if (property.NameEquals("environment")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environment = MachineLearningComputeInstanceEnvironmentInfo.DeserializeMachineLearningComputeInstanceEnvironmentInfo(property.Value); + continue; + } + if (property.NameEquals("services")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BinaryData.FromString(item.GetRawText())); + } + services = array; + continue; + } + } + return new MachineLearningComputeInstanceContainer(name.Value, Optional.ToNullable(autosave), gpu.Value, Optional.ToNullable(network), environment.Value, Optional.ToList(services)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceContainer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceContainer.cs new file mode 100644 index 000000000000..3e20339efbed --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceContainer.cs @@ -0,0 +1,119 @@ +// 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 +{ + /// + /// Defines an Aml Instance container. + /// Serialized Name: ComputeInstanceContainer + /// + public partial class MachineLearningComputeInstanceContainer + { + /// Initializes a new instance of MachineLearningComputeInstanceContainer. + internal MachineLearningComputeInstanceContainer() + { + Services = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningComputeInstanceContainer. + /// + /// Name of the ComputeInstance container. + /// Serialized Name: ComputeInstanceContainer.name + /// + /// + /// Auto save settings. + /// Serialized Name: ComputeInstanceContainer.autosave + /// + /// + /// Information of GPU. + /// Serialized Name: ComputeInstanceContainer.gpu + /// + /// + /// network of this container. + /// Serialized Name: ComputeInstanceContainer.network + /// + /// + /// Environment information of this container. + /// Serialized Name: ComputeInstanceContainer.environment + /// + /// + /// services of this containers. + /// Serialized Name: ComputeInstanceContainer.services + /// + internal MachineLearningComputeInstanceContainer(string name, MachineLearningComputeInstanceAutosave? autosave, string gpu, MachineLearningNetwork? network, MachineLearningComputeInstanceEnvironmentInfo environment, IReadOnlyList services) + { + Name = name; + Autosave = autosave; + Gpu = gpu; + Network = network; + Environment = environment; + Services = services; + } + + /// + /// Name of the ComputeInstance container. + /// Serialized Name: ComputeInstanceContainer.name + /// + public string Name { get; } + /// + /// Auto save settings. + /// Serialized Name: ComputeInstanceContainer.autosave + /// + public MachineLearningComputeInstanceAutosave? Autosave { get; } + /// + /// Information of GPU. + /// Serialized Name: ComputeInstanceContainer.gpu + /// + public string Gpu { get; } + /// + /// network of this container. + /// Serialized Name: ComputeInstanceContainer.network + /// + public MachineLearningNetwork? Network { get; } + /// + /// Environment information of this container. + /// Serialized Name: ComputeInstanceContainer.environment + /// + public MachineLearningComputeInstanceEnvironmentInfo Environment { get; } + /// + /// services of this containers. + /// Serialized Name: ComputeInstanceContainer.services + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formated 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 IReadOnlyList Services { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceCreatedBy.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceCreatedBy.Serialization.cs new file mode 100644 index 000000000000..6d496434b6ff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceCreatedBy.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceCreatedBy + { + internal static MachineLearningComputeInstanceCreatedBy DeserializeMachineLearningComputeInstanceCreatedBy(JsonElement element) + { + Optional userName = default; + Optional userOrgId = default; + Optional userId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + userName = null; + continue; + } + userName = property.Value.GetString(); + continue; + } + if (property.NameEquals("userOrgId")) + { + userOrgId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + userId = null; + continue; + } + userId = property.Value.GetString(); + continue; + } + } + return new MachineLearningComputeInstanceCreatedBy(userName.Value, userOrgId.Value, userId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceCreatedBy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceCreatedBy.cs new file mode 100644 index 000000000000..8087b2754706 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceCreatedBy.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Describes information on user who created this ComputeInstance. + /// Serialized Name: ComputeInstanceCreatedBy + /// + public partial class MachineLearningComputeInstanceCreatedBy + { + /// Initializes a new instance of MachineLearningComputeInstanceCreatedBy. + internal MachineLearningComputeInstanceCreatedBy() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceCreatedBy. + /// + /// Name of the user. + /// Serialized Name: ComputeInstanceCreatedBy.userName + /// + /// + /// Uniquely identifies user' Azure Active Directory organization. + /// Serialized Name: ComputeInstanceCreatedBy.userOrgId + /// + /// + /// Uniquely identifies the user within his/her organization. + /// Serialized Name: ComputeInstanceCreatedBy.userId + /// + internal MachineLearningComputeInstanceCreatedBy(string userName, string userOrgId, string userId) + { + UserName = userName; + UserOrgId = userOrgId; + UserId = userId; + } + + /// + /// Name of the user. + /// Serialized Name: ComputeInstanceCreatedBy.userName + /// + public string UserName { get; } + /// + /// Uniquely identifies user' Azure Active Directory organization. + /// Serialized Name: ComputeInstanceCreatedBy.userOrgId + /// + public string UserOrgId { get; } + /// + /// Uniquely identifies the user within his/her organization. + /// Serialized Name: ComputeInstanceCreatedBy.userId + /// + public string UserId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataDisk.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataDisk.Serialization.cs new file mode 100644 index 000000000000..7034ccd9d1f3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataDisk.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceDataDisk + { + internal static MachineLearningComputeInstanceDataDisk DeserializeMachineLearningComputeInstanceDataDisk(JsonElement element) + { + Optional caching = default; + Optional diskSizeGB = default; + Optional lun = default; + Optional storageAccountType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caching")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + caching = new MachineLearningCachingType(property.Value.GetString()); + continue; + } + if (property.NameEquals("diskSizeGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + diskSizeGB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("lun")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + lun = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("storageAccountType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + storageAccountType = new MachineLearningStorageAccountType(property.Value.GetString()); + continue; + } + } + return new MachineLearningComputeInstanceDataDisk(Optional.ToNullable(caching), Optional.ToNullable(diskSizeGB), Optional.ToNullable(lun), Optional.ToNullable(storageAccountType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataDisk.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataDisk.cs new file mode 100644 index 000000000000..bfb03687ce28 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataDisk.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Defines an Aml Instance DataDisk. + /// Serialized Name: ComputeInstanceDataDisk + /// + public partial class MachineLearningComputeInstanceDataDisk + { + /// Initializes a new instance of MachineLearningComputeInstanceDataDisk. + internal MachineLearningComputeInstanceDataDisk() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceDataDisk. + /// + /// Caching type of Data Disk. + /// Serialized Name: ComputeInstanceDataDisk.caching + /// + /// + /// The initial disk size in gigabytes. + /// Serialized Name: ComputeInstanceDataDisk.diskSizeGB + /// + /// + /// The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. + /// Serialized Name: ComputeInstanceDataDisk.lun + /// + /// + /// type of this storage account. + /// Serialized Name: ComputeInstanceDataDisk.storageAccountType + /// + internal MachineLearningComputeInstanceDataDisk(MachineLearningCachingType? caching, int? diskSizeGB, int? lun, MachineLearningStorageAccountType? storageAccountType) + { + Caching = caching; + DiskSizeGB = diskSizeGB; + Lun = lun; + StorageAccountType = storageAccountType; + } + + /// + /// Caching type of Data Disk. + /// Serialized Name: ComputeInstanceDataDisk.caching + /// + public MachineLearningCachingType? Caching { get; } + /// + /// The initial disk size in gigabytes. + /// Serialized Name: ComputeInstanceDataDisk.diskSizeGB + /// + public int? DiskSizeGB { get; } + /// + /// The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun. + /// Serialized Name: ComputeInstanceDataDisk.lun + /// + public int? Lun { get; } + /// + /// type of this storage account. + /// Serialized Name: ComputeInstanceDataDisk.storageAccountType + /// + public MachineLearningStorageAccountType? StorageAccountType { get; } + } +} 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 new file mode 100644 index 000000000000..ad8be913a374 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceDataMount + { + internal static MachineLearningComputeInstanceDataMount DeserializeMachineLearningComputeInstanceDataMount(JsonElement element) + { + Optional source = default; + Optional sourceType = default; + Optional mountName = default; + Optional mountAction = default; + Optional createdBy = default; + Optional mountPath = default; + Optional mountState = default; + Optional mountedOn = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source")) + { + source = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sourceType = new MachineLearningSourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountName")) + { + mountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountAction")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mountAction = new MachineLearningMountAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("createdBy")) + { + createdBy = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountPath")) + { + mountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mountState = new MachineLearningMountState(property.Value.GetString()); + continue; + } + if (property.NameEquals("mountedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mountedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("error")) + { + error = property.Value.GetString(); + continue; + } + } + return new MachineLearningComputeInstanceDataMount(source.Value, Optional.ToNullable(sourceType), mountName.Value, Optional.ToNullable(mountAction), createdBy.Value, mountPath.Value, Optional.ToNullable(mountState), Optional.ToNullable(mountedOn), error.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs new file mode 100644 index 000000000000..80d7a4b2cc58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceDataMount.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Defines an Aml Instance DataMount. + /// Serialized Name: ComputeInstanceDataMount + /// + public partial class MachineLearningComputeInstanceDataMount + { + /// Initializes a new instance of MachineLearningComputeInstanceDataMount. + internal MachineLearningComputeInstanceDataMount() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceDataMount. + /// + /// Source of the ComputeInstance data mount. + /// Serialized Name: ComputeInstanceDataMount.source + /// + /// + /// Data source type. + /// Serialized Name: ComputeInstanceDataMount.sourceType + /// + /// + /// name of the ComputeInstance data mount. + /// Serialized Name: ComputeInstanceDataMount.mountName + /// + /// + /// Mount Action. + /// Serialized Name: ComputeInstanceDataMount.mountAction + /// + /// + /// who this data mount created by. + /// Serialized Name: ComputeInstanceDataMount.createdBy + /// + /// + /// Path of this data mount. + /// Serialized Name: ComputeInstanceDataMount.mountPath + /// + /// + /// Mount state. + /// Serialized Name: ComputeInstanceDataMount.mountState + /// + /// + /// The time when the disk mounted. + /// Serialized Name: ComputeInstanceDataMount.mountedOn + /// + /// + /// Error of this data mount. + /// Serialized Name: ComputeInstanceDataMount.error + /// + internal MachineLearningComputeInstanceDataMount(string source, MachineLearningSourceType? sourceType, string mountName, MachineLearningMountAction? mountAction, string createdBy, string mountPath, MachineLearningMountState? mountState, DateTimeOffset? mountedOn, string error) + { + Source = source; + SourceType = sourceType; + MountName = mountName; + MountAction = mountAction; + CreatedBy = createdBy; + MountPath = mountPath; + MountState = mountState; + MountedOn = mountedOn; + Error = error; + } + + /// + /// Source of the ComputeInstance data mount. + /// Serialized Name: ComputeInstanceDataMount.source + /// + public string Source { get; } + /// + /// Data source type. + /// Serialized Name: ComputeInstanceDataMount.sourceType + /// + public MachineLearningSourceType? SourceType { get; } + /// + /// name of the ComputeInstance data mount. + /// Serialized Name: ComputeInstanceDataMount.mountName + /// + public string MountName { get; } + /// + /// Mount Action. + /// Serialized Name: ComputeInstanceDataMount.mountAction + /// + public MachineLearningMountAction? MountAction { get; } + /// + /// who this data mount created by. + /// Serialized Name: ComputeInstanceDataMount.createdBy + /// + public string CreatedBy { get; } + /// + /// Path of this data mount. + /// Serialized Name: ComputeInstanceDataMount.mountPath + /// + public string MountPath { get; } + /// + /// Mount state. + /// Serialized Name: ComputeInstanceDataMount.mountState + /// + public MachineLearningMountState? MountState { get; } + /// + /// The time when the disk mounted. + /// Serialized Name: ComputeInstanceDataMount.mountedOn + /// + public DateTimeOffset? MountedOn { get; } + /// + /// Error of this data mount. + /// Serialized Name: ComputeInstanceDataMount.error + /// + public string Error { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceEnvironmentInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceEnvironmentInfo.Serialization.cs new file mode 100644 index 000000000000..b5d652ec248a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceEnvironmentInfo.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceEnvironmentInfo + { + internal static MachineLearningComputeInstanceEnvironmentInfo DeserializeMachineLearningComputeInstanceEnvironmentInfo(JsonElement element) + { + Optional name = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new MachineLearningComputeInstanceEnvironmentInfo(name.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceEnvironmentInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceEnvironmentInfo.cs new file mode 100644 index 000000000000..3e592054a673 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceEnvironmentInfo.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Environment information + /// Serialized Name: ComputeInstanceEnvironmentInfo + /// + public partial class MachineLearningComputeInstanceEnvironmentInfo + { + /// Initializes a new instance of MachineLearningComputeInstanceEnvironmentInfo. + internal MachineLearningComputeInstanceEnvironmentInfo() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceEnvironmentInfo. + /// + /// name of environment. + /// Serialized Name: ComputeInstanceEnvironmentInfo.name + /// + /// + /// version of environment. + /// Serialized Name: ComputeInstanceEnvironmentInfo.version + /// + internal MachineLearningComputeInstanceEnvironmentInfo(string name, string version) + { + Name = name; + Version = version; + } + + /// + /// name of environment. + /// Serialized Name: ComputeInstanceEnvironmentInfo.name + /// + public string Name { get; } + /// + /// version of environment. + /// Serialized Name: ComputeInstanceEnvironmentInfo.version + /// + public string Version { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceLastOperation.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceLastOperation.Serialization.cs new file mode 100644 index 000000000000..c2e4dd493328 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceLastOperation.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceLastOperation + { + internal static MachineLearningComputeInstanceLastOperation DeserializeMachineLearningComputeInstanceLastOperation(JsonElement element) + { + Optional operationName = default; + Optional operationTime = default; + Optional operationStatus = default; + Optional operationTrigger = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("operationName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationName = new MachineLearningOperationName(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("operationStatus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationStatus = new MachineLearningOperationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationTrigger")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + operationTrigger = new MachineLearningOperationTrigger(property.Value.GetString()); + continue; + } + } + return new MachineLearningComputeInstanceLastOperation(Optional.ToNullable(operationName), Optional.ToNullable(operationTime), Optional.ToNullable(operationStatus), Optional.ToNullable(operationTrigger)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceLastOperation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceLastOperation.cs new file mode 100644 index 000000000000..b976d62d46c6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceLastOperation.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The last operation on ComputeInstance. + /// Serialized Name: ComputeInstanceLastOperation + /// + public partial class MachineLearningComputeInstanceLastOperation + { + /// Initializes a new instance of MachineLearningComputeInstanceLastOperation. + internal MachineLearningComputeInstanceLastOperation() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceLastOperation. + /// + /// Name of the last operation. + /// Serialized Name: ComputeInstanceLastOperation.operationName + /// + /// + /// Time of the last operation. + /// Serialized Name: ComputeInstanceLastOperation.operationTime + /// + /// + /// Operation status. + /// Serialized Name: ComputeInstanceLastOperation.operationStatus + /// + /// + /// Trigger of operation. + /// Serialized Name: ComputeInstanceLastOperation.operationTrigger + /// + internal MachineLearningComputeInstanceLastOperation(MachineLearningOperationName? operationName, DateTimeOffset? operationOn, MachineLearningOperationStatus? operationStatus, MachineLearningOperationTrigger? operationTrigger) + { + OperationName = operationName; + OperationOn = operationOn; + OperationStatus = operationStatus; + OperationTrigger = operationTrigger; + } + + /// + /// Name of the last operation. + /// Serialized Name: ComputeInstanceLastOperation.operationName + /// + public MachineLearningOperationName? OperationName { get; } + /// + /// Time of the last operation. + /// Serialized Name: ComputeInstanceLastOperation.operationTime + /// + public DateTimeOffset? OperationOn { get; } + /// + /// Operation status. + /// Serialized Name: ComputeInstanceLastOperation.operationStatus + /// + public MachineLearningOperationStatus? OperationStatus { get; } + /// + /// Trigger of operation. + /// Serialized Name: ComputeInstanceLastOperation.operationTrigger + /// + public MachineLearningOperationTrigger? OperationTrigger { 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 new file mode 100644 index 000000000000..1c4fa4b157cf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.Serialization.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VmSize)) + { + writer.WritePropertyName("vmSize"); + writer.WriteStringValue(VmSize); + } + if (Optional.IsDefined(Subnet)) + { + if (Subnet != null) + { + writer.WritePropertyName("subnet"); + writer.WriteObjectValue(Subnet); + } + else + { + writer.WriteNull("subnet"); + } + } + if (Optional.IsDefined(ApplicationSharingPolicy)) + { + writer.WritePropertyName("applicationSharingPolicy"); + writer.WriteStringValue(ApplicationSharingPolicy.Value.ToString()); + } + if (Optional.IsDefined(SshSettings)) + { + if (SshSettings != null) + { + writer.WritePropertyName("sshSettings"); + writer.WriteObjectValue(SshSettings); + } + else + { + writer.WriteNull("sshSettings"); + } + } + if (Optional.IsDefined(ComputeInstanceAuthorizationType)) + { + if (ComputeInstanceAuthorizationType != null) + { + writer.WritePropertyName("computeInstanceAuthorizationType"); + writer.WriteStringValue(ComputeInstanceAuthorizationType.Value.ToString()); + } + else + { + writer.WriteNull("computeInstanceAuthorizationType"); + } + } + if (Optional.IsDefined(PersonalComputeInstanceSettings)) + { + if (PersonalComputeInstanceSettings != null) + { + writer.WritePropertyName("personalComputeInstanceSettings"); + writer.WriteObjectValue(PersonalComputeInstanceSettings); + } + else + { + writer.WriteNull("personalComputeInstanceSettings"); + } + } + if (Optional.IsDefined(SetupScriptsSettings)) + { + if (SetupScriptsSettings != null) + { + writer.WritePropertyName("setupScripts"); + writer.WriteObjectValue(SetupScriptsSettings); + } + else + { + writer.WriteNull("setupScripts"); + } + } + if (Optional.IsDefined(EnableNodePublicIP)) + { + writer.WritePropertyName("enableNodePublicIp"); + writer.WriteBooleanValue(EnableNodePublicIP.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningComputeInstanceProperties DeserializeMachineLearningComputeInstanceProperties(JsonElement element) + { + Optional vmSize = default; + Optional subnet = default; + Optional applicationSharingPolicy = default; + Optional sshSettings = default; + Optional connectivityEndpoints = default; + Optional> applications = default; + Optional createdBy = default; + Optional> errors = default; + Optional state = default; + Optional computeInstanceAuthorizationType = default; + Optional personalComputeInstanceSettings = default; + Optional setupScripts = default; + Optional lastOperation = default; + Optional schedules = default; + Optional enableNodePublicIP = default; + Optional> containers = default; + Optional> dataDisks = default; + Optional> dataMounts = default; + Optional versions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmSize")) + { + vmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("subnet")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + subnet = null; + continue; + } + subnet = ResourceId.DeserializeResourceId(property.Value); + continue; + } + if (property.NameEquals("applicationSharingPolicy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + applicationSharingPolicy = new MachineLearningApplicationSharingPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("sshSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sshSettings = null; + continue; + } + sshSettings = MachineLearningComputeInstanceSshSettings.DeserializeMachineLearningComputeInstanceSshSettings(property.Value); + continue; + } + if (property.NameEquals("connectivityEndpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + connectivityEndpoints = MachineLearningComputeInstanceConnectivityEndpoints.DeserializeMachineLearningComputeInstanceConnectivityEndpoints(property.Value); + continue; + } + if (property.NameEquals("applications")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningComputeInstanceApplication.DeserializeMachineLearningComputeInstanceApplication(item)); + } + applications = array; + continue; + } + if (property.NameEquals("createdBy")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdBy = MachineLearningComputeInstanceCreatedBy.DeserializeMachineLearningComputeInstanceCreatedBy(property.Value); + continue; + } + if (property.NameEquals("errors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + errors = array; + continue; + } + if (property.NameEquals("state")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + state = new MachineLearningComputeInstanceState(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeInstanceAuthorizationType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + computeInstanceAuthorizationType = null; + continue; + } + computeInstanceAuthorizationType = new MachineLearningComputeInstanceAuthorizationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("personalComputeInstanceSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + personalComputeInstanceSettings = null; + continue; + } + personalComputeInstanceSettings = PersonalComputeInstanceSettings.DeserializePersonalComputeInstanceSettings(property.Value); + continue; + } + if (property.NameEquals("setupScripts")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + setupScripts = null; + continue; + } + setupScripts = SetupScripts.DeserializeSetupScripts(property.Value); + continue; + } + if (property.NameEquals("lastOperation")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + lastOperation = null; + continue; + } + lastOperation = MachineLearningComputeInstanceLastOperation.DeserializeMachineLearningComputeInstanceLastOperation(property.Value); + continue; + } + if (property.NameEquals("schedules")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + schedules = null; + continue; + } + schedules = ComputeSchedules.DeserializeComputeSchedules(property.Value); + continue; + } + if (property.NameEquals("enableNodePublicIp")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableNodePublicIP = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("containers")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containers = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningComputeInstanceContainer.DeserializeMachineLearningComputeInstanceContainer(item)); + } + containers = array; + continue; + } + if (property.NameEquals("dataDisks")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataDisks = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningComputeInstanceDataDisk.DeserializeMachineLearningComputeInstanceDataDisk(item)); + } + dataDisks = array; + continue; + } + if (property.NameEquals("dataMounts")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dataMounts = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningComputeInstanceDataMount.DeserializeMachineLearningComputeInstanceDataMount(item)); + } + dataMounts = array; + continue; + } + if (property.NameEquals("versions")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + versions = ComputeInstanceVersion.DeserializeComputeInstanceVersion(property.Value); + continue; + } + } + return new MachineLearningComputeInstanceProperties(vmSize.Value, subnet.Value, Optional.ToNullable(applicationSharingPolicy), sshSettings.Value, connectivityEndpoints.Value, Optional.ToList(applications), createdBy.Value, Optional.ToList(errors), Optional.ToNullable(state), Optional.ToNullable(computeInstanceAuthorizationType), personalComputeInstanceSettings.Value, setupScripts.Value, lastOperation.Value, schedules.Value, Optional.ToNullable(enableNodePublicIP), Optional.ToList(containers), Optional.ToList(dataDisks), Optional.ToList(dataMounts), versions.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs new file mode 100644 index 000000000000..a7240ad072d1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceProperties.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Compute Instance properties + /// Serialized Name: ComputeInstanceProperties + /// + public partial class MachineLearningComputeInstanceProperties + { + /// Initializes a new instance of MachineLearningComputeInstanceProperties. + public MachineLearningComputeInstanceProperties() + { + Applications = new ChangeTrackingList(); + Errors = new ChangeTrackingList(); + Containers = new ChangeTrackingList(); + DataDisks = new ChangeTrackingList(); + DataMounts = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningComputeInstanceProperties. + /// + /// Virtual Machine Size + /// Serialized Name: ComputeInstanceProperties.vmSize + /// + /// + /// Virtual network subnet resource ID the compute nodes belong to. + /// Serialized Name: ComputeInstanceProperties.subnet + /// + /// + /// 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. + /// Serialized Name: ComputeInstanceProperties.applicationSharingPolicy + /// + /// + /// Specifies policy and settings for SSH access. + /// Serialized Name: ComputeInstanceProperties.sshSettings + /// + /// + /// Describes all connectivity endpoints available for this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.connectivityEndpoints + /// + /// + /// Describes available applications and their endpoints on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.applications + /// + /// + /// Describes information on user who created this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.createdBy + /// + /// + /// Collection of errors encountered on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.errors + /// + /// + /// The current state of this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.state + /// + /// + /// The Compute Instance Authorization type. Available values are personal (default). + /// Serialized Name: ComputeInstanceProperties.computeInstanceAuthorizationType + /// + /// + /// Settings for a personal compute instance. + /// Serialized Name: ComputeInstanceProperties.personalComputeInstanceSettings + /// + /// + /// Details of customized scripts to execute for setting up the cluster. + /// Serialized Name: ComputeInstanceProperties.setupScripts + /// + /// + /// The last operation on ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.lastOperation + /// + /// + /// The list of schedules to be applied on the computes. + /// Serialized Name: ComputeInstanceProperties.schedules + /// + /// + /// 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. + /// Serialized Name: ComputeInstanceProperties.enableNodePublicIp + /// + /// + /// Describes informations of containers on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.containers + /// + /// + /// Describes informations of dataDisks on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.dataDisks + /// + /// + /// Describes informations of dataMounts on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.dataMounts + /// + /// + /// ComputeInstance version. + /// Serialized Name: ComputeInstanceProperties.versions + /// + internal MachineLearningComputeInstanceProperties(string vmSize, ResourceId subnet, MachineLearningApplicationSharingPolicy? applicationSharingPolicy, MachineLearningComputeInstanceSshSettings sshSettings, 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) + { + VmSize = vmSize; + Subnet = subnet; + ApplicationSharingPolicy = applicationSharingPolicy; + SshSettings = sshSettings; + ConnectivityEndpoints = connectivityEndpoints; + Applications = applications; + CreatedBy = createdBy; + Errors = errors; + State = state; + ComputeInstanceAuthorizationType = computeInstanceAuthorizationType; + PersonalComputeInstanceSettings = personalComputeInstanceSettings; + SetupScriptsSettings = setupScriptsSettings; + LastOperation = lastOperation; + Schedules = schedules; + EnableNodePublicIP = enableNodePublicIP; + Containers = containers; + DataDisks = dataDisks; + DataMounts = dataMounts; + Versions = versions; + } + + /// + /// Virtual Machine Size + /// Serialized Name: ComputeInstanceProperties.vmSize + /// + public string VmSize { get; set; } + /// + /// Virtual network subnet resource ID the compute nodes belong to. + /// Serialized Name: ComputeInstanceProperties.subnet + /// + internal ResourceId Subnet { get; set; } + /// + /// The ID of the resource + /// Serialized Name: ResourceId.id + /// + public string SubnetId + { + get => Subnet is null ? default : Subnet.Id; + set => Subnet = new ResourceId(value); + } + + /// + /// 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. + /// Serialized Name: ComputeInstanceProperties.applicationSharingPolicy + /// + public MachineLearningApplicationSharingPolicy? ApplicationSharingPolicy { get; set; } + /// + /// Specifies policy and settings for SSH access. + /// Serialized Name: ComputeInstanceProperties.sshSettings + /// + public MachineLearningComputeInstanceSshSettings SshSettings { get; set; } + /// + /// Describes all connectivity endpoints available for this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.connectivityEndpoints + /// + public MachineLearningComputeInstanceConnectivityEndpoints ConnectivityEndpoints { get; } + /// + /// Describes available applications and their endpoints on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.applications + /// + public IReadOnlyList Applications { get; } + /// + /// Describes information on user who created this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.createdBy + /// + public MachineLearningComputeInstanceCreatedBy CreatedBy { get; } + /// + /// Collection of errors encountered on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.errors + /// + public IReadOnlyList Errors { get; } + /// + /// The current state of this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.state + /// + public MachineLearningComputeInstanceState? State { get; } + /// + /// The Compute Instance Authorization type. Available values are personal (default). + /// Serialized Name: ComputeInstanceProperties.computeInstanceAuthorizationType + /// + public MachineLearningComputeInstanceAuthorizationType? ComputeInstanceAuthorizationType { get; set; } + /// + /// Settings for a personal compute instance. + /// Serialized Name: ComputeInstanceProperties.personalComputeInstanceSettings + /// + internal PersonalComputeInstanceSettings PersonalComputeInstanceSettings { get; set; } + /// + /// A user explicitly assigned to a personal compute instance. + /// Serialized Name: PersonalComputeInstanceSettings.assignedUser + /// + public MachineLearningComputeInstanceAssignedUser PersonalComputeInstanceAssignedUser + { + get => PersonalComputeInstanceSettings is null ? default : PersonalComputeInstanceSettings.AssignedUser; + set + { + if (PersonalComputeInstanceSettings is null) + PersonalComputeInstanceSettings = new PersonalComputeInstanceSettings(); + PersonalComputeInstanceSettings.AssignedUser = value; + } + } + + /// + /// Details of customized scripts to execute for setting up the cluster. + /// Serialized Name: ComputeInstanceProperties.setupScripts + /// + internal SetupScripts SetupScriptsSettings { get; set; } + /// + /// Customized setup scripts + /// Serialized Name: SetupScripts.scripts + /// + public MachineLearningScriptsToExecute Scripts + { + get => SetupScriptsSettings is null ? default : SetupScriptsSettings.Scripts; + set + { + if (SetupScriptsSettings is null) + SetupScriptsSettings = new SetupScripts(); + SetupScriptsSettings.Scripts = value; + } + } + + /// + /// The last operation on ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.lastOperation + /// + public MachineLearningComputeInstanceLastOperation LastOperation { get; } + /// + /// The list of schedules to be applied on the computes. + /// Serialized Name: ComputeInstanceProperties.schedules + /// + internal ComputeSchedules Schedules { get; } + /// + /// The list of compute start stop schedules to be applied. + /// Serialized Name: ComputeSchedules.computeStartStop + /// + public IReadOnlyList SchedulesComputeStartStop + { + get => Schedules?.ComputeStartStop; + } + + /// + /// 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. + /// Serialized Name: ComputeInstanceProperties.enableNodePublicIp + /// + public bool? EnableNodePublicIP { get; set; } + /// + /// Describes informations of containers on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.containers + /// + public IReadOnlyList Containers { get; } + /// + /// Describes informations of dataDisks on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.dataDisks + /// + public IReadOnlyList DataDisks { get; } + /// + /// Describes informations of dataMounts on this ComputeInstance. + /// Serialized Name: ComputeInstanceProperties.dataMounts + /// + public IReadOnlyList DataMounts { get; } + /// + /// ComputeInstance version. + /// Serialized Name: ComputeInstanceProperties.versions + /// + internal ComputeInstanceVersion Versions { get; } + /// + /// Runtime of compute instance. + /// Serialized Name: ComputeInstanceVersion.runtime + /// + public string VersionsRuntime + { + get => Versions?.Runtime; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceSshSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceSshSettings.Serialization.cs new file mode 100644 index 000000000000..c622348507ca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceSshSettings.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeInstanceSshSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SshPublicAccess)) + { + writer.WritePropertyName("sshPublicAccess"); + writer.WriteStringValue(SshPublicAccess.Value.ToString()); + } + if (Optional.IsDefined(AdminPublicKey)) + { + writer.WritePropertyName("adminPublicKey"); + writer.WriteStringValue(AdminPublicKey); + } + writer.WriteEndObject(); + } + + internal static MachineLearningComputeInstanceSshSettings DeserializeMachineLearningComputeInstanceSshSettings(JsonElement element) + { + Optional sshPublicAccess = default; + Optional adminUserName = default; + Optional sshPort = default; + Optional adminPublicKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sshPublicAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPublicAccess = new MachineLearningSshPublicAccess(property.Value.GetString()); + continue; + } + if (property.NameEquals("adminUserName")) + { + adminUserName = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("adminPublicKey")) + { + adminPublicKey = property.Value.GetString(); + continue; + } + } + return new MachineLearningComputeInstanceSshSettings(Optional.ToNullable(sshPublicAccess), adminUserName.Value, Optional.ToNullable(sshPort), adminPublicKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceSshSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceSshSettings.cs new file mode 100644 index 000000000000..ad6142453662 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceSshSettings.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Specifies policy and settings for SSH access. + /// Serialized Name: ComputeInstanceSshSettings + /// + public partial class MachineLearningComputeInstanceSshSettings + { + /// Initializes a new instance of MachineLearningComputeInstanceSshSettings. + public MachineLearningComputeInstanceSshSettings() + { + } + + /// Initializes a new instance of MachineLearningComputeInstanceSshSettings. + /// + /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. + /// Serialized Name: ComputeInstanceSshSettings.sshPublicAccess + /// + /// + /// Describes the admin user name. + /// Serialized Name: ComputeInstanceSshSettings.adminUserName + /// + /// + /// Describes the port for connecting through SSH. + /// Serialized Name: ComputeInstanceSshSettings.sshPort + /// + /// + /// Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + /// Serialized Name: ComputeInstanceSshSettings.adminPublicKey + /// + internal MachineLearningComputeInstanceSshSettings(MachineLearningSshPublicAccess? sshPublicAccess, string adminUserName, int? sshPort, string adminPublicKey) + { + SshPublicAccess = sshPublicAccess; + AdminUserName = adminUserName; + SshPort = sshPort; + AdminPublicKey = adminPublicKey; + } + + /// + /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. + /// Serialized Name: ComputeInstanceSshSettings.sshPublicAccess + /// + public MachineLearningSshPublicAccess? SshPublicAccess { get; set; } + /// + /// Describes the admin user name. + /// Serialized Name: ComputeInstanceSshSettings.adminUserName + /// + public string AdminUserName { get; } + /// + /// Describes the port for connecting through SSH. + /// Serialized Name: ComputeInstanceSshSettings.sshPort + /// + public int? SshPort { get; } + /// + /// Specifies the SSH rsa public key file as a string. Use "ssh-keygen -t rsa -b 2048" to generate your SSH key pairs. + /// Serialized Name: ComputeInstanceSshSettings.adminPublicKey + /// + public string AdminPublicKey { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs new file mode 100644 index 000000000000..f9045dd0ead6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeInstanceState.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Current state of an ComputeInstance. + /// Serialized Name: ComputeInstanceState + /// + public readonly partial struct MachineLearningComputeInstanceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningComputeInstanceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string CreateFailedValue = "CreateFailed"; + private const string DeletingValue = "Deleting"; + private const string RunningValue = "Running"; + private const string RestartingValue = "Restarting"; + private const string JobRunningValue = "JobRunning"; + private const string SettingUpValue = "SettingUp"; + private const string SetupFailedValue = "SetupFailed"; + private const string StartingValue = "Starting"; + private const string StoppedValue = "Stopped"; + private const string StoppingValue = "Stopping"; + private const string UserSettingUpValue = "UserSettingUp"; + private const string UserSetupFailedValue = "UserSetupFailed"; + private const string UnknownValue = "Unknown"; + private const string UnusableValue = "Unusable"; + + /// + /// Creating + /// Serialized Name: ComputeInstanceState.Creating + /// + public static MachineLearningComputeInstanceState Creating { get; } = new MachineLearningComputeInstanceState(CreatingValue); + /// + /// CreateFailed + /// Serialized Name: ComputeInstanceState.CreateFailed + /// + public static MachineLearningComputeInstanceState CreateFailed { get; } = new MachineLearningComputeInstanceState(CreateFailedValue); + /// + /// Deleting + /// Serialized Name: ComputeInstanceState.Deleting + /// + public static MachineLearningComputeInstanceState Deleting { get; } = new MachineLearningComputeInstanceState(DeletingValue); + /// + /// Running + /// Serialized Name: ComputeInstanceState.Running + /// + public static MachineLearningComputeInstanceState Running { get; } = new MachineLearningComputeInstanceState(RunningValue); + /// + /// Restarting + /// Serialized Name: ComputeInstanceState.Restarting + /// + public static MachineLearningComputeInstanceState Restarting { get; } = new MachineLearningComputeInstanceState(RestartingValue); + /// + /// JobRunning + /// Serialized Name: ComputeInstanceState.JobRunning + /// + public static MachineLearningComputeInstanceState JobRunning { get; } = new MachineLearningComputeInstanceState(JobRunningValue); + /// + /// SettingUp + /// Serialized Name: ComputeInstanceState.SettingUp + /// + public static MachineLearningComputeInstanceState SettingUp { get; } = new MachineLearningComputeInstanceState(SettingUpValue); + /// + /// SetupFailed + /// Serialized Name: ComputeInstanceState.SetupFailed + /// + public static MachineLearningComputeInstanceState SetupFailed { get; } = new MachineLearningComputeInstanceState(SetupFailedValue); + /// + /// Starting + /// Serialized Name: ComputeInstanceState.Starting + /// + public static MachineLearningComputeInstanceState Starting { get; } = new MachineLearningComputeInstanceState(StartingValue); + /// + /// Stopped + /// Serialized Name: ComputeInstanceState.Stopped + /// + public static MachineLearningComputeInstanceState Stopped { get; } = new MachineLearningComputeInstanceState(StoppedValue); + /// + /// Stopping + /// Serialized Name: ComputeInstanceState.Stopping + /// + public static MachineLearningComputeInstanceState Stopping { get; } = new MachineLearningComputeInstanceState(StoppingValue); + /// + /// UserSettingUp + /// Serialized Name: ComputeInstanceState.UserSettingUp + /// + public static MachineLearningComputeInstanceState UserSettingUp { get; } = new MachineLearningComputeInstanceState(UserSettingUpValue); + /// + /// UserSetupFailed + /// Serialized Name: ComputeInstanceState.UserSetupFailed + /// + public static MachineLearningComputeInstanceState UserSetupFailed { get; } = new MachineLearningComputeInstanceState(UserSetupFailedValue); + /// + /// Unknown + /// Serialized Name: ComputeInstanceState.Unknown + /// + public static MachineLearningComputeInstanceState Unknown { get; } = new MachineLearningComputeInstanceState(UnknownValue); + /// + /// Unusable + /// Serialized Name: ComputeInstanceState.Unusable + /// + public static MachineLearningComputeInstanceState Unusable { get; } = new MachineLearningComputeInstanceState(UnusableValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningComputeInstanceState left, MachineLearningComputeInstanceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningComputeInstanceState left, MachineLearningComputeInstanceState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningComputeInstanceState(string value) => new MachineLearningComputeInstanceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningComputeInstanceState other && Equals(other); + /// + public bool Equals(MachineLearningComputeInstanceState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePatch.cs index 4befc118bd24..1f3c49a1138a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePatch.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePatch.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// AmlCompute update parameters. + /// + /// AmlCompute update parameters. + /// Serialized Name: ClusterUpdateParameters + /// public partial class MachineLearningComputePatch { /// Initializes a new instance of MachineLearningComputePatch. @@ -15,10 +18,16 @@ public MachineLearningComputePatch() { } - /// Properties of ClusterUpdate. + /// + /// Properties of ClusterUpdate + /// Serialized Name: ClusterUpdateParameters.properties.properties + /// internal ScaleSettingsInformation Properties { get; set; } - /// scale settings for AML Compute. - public ScaleSettings ScaleSettings + /// + /// scale settings for AML Compute + /// Serialized Name: ScaleSettingsInformation.scaleSettings + /// + public AmlComputeScaleSettings ScaleSettings { get => Properties is null ? default : Properties.ScaleSettings; set diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs new file mode 100644 index 000000000000..bc3422a7bfde --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputePowerAction.cs @@ -0,0 +1,60 @@ +// 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 compute power action. + /// Serialized Name: ComputePowerAction + /// + public readonly partial struct MachineLearningComputePowerAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningComputePowerAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartValue = "Start"; + private const string StopValue = "Stop"; + + /// + /// Start + /// Serialized Name: ComputePowerAction.Start + /// + public static MachineLearningComputePowerAction Start { get; } = new MachineLearningComputePowerAction(StartValue); + /// + /// Stop + /// Serialized Name: ComputePowerAction.Stop + /// + public static MachineLearningComputePowerAction Stop { get; } = new MachineLearningComputePowerAction(StopValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningComputePowerAction left, MachineLearningComputePowerAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningComputePowerAction left, MachineLearningComputePowerAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningComputePowerAction(string value) => new MachineLearningComputePowerAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningComputePowerAction other && Equals(other); + /// + public bool Equals(MachineLearningComputePowerAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProperties.Serialization.cs new file mode 100644 index 000000000000..24481a3282a8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProperties.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningComputeProperties DeserializeMachineLearningComputeProperties(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AKS": return MachineLearningAksCompute.DeserializeMachineLearningAksCompute(element); + case "AmlCompute": return AmlCompute.DeserializeAmlCompute(element); + case "ComputeInstance": return MachineLearningComputeInstance.DeserializeMachineLearningComputeInstance(element); + case "DataFactory": return MachineLearningDataFactoryCompute.DeserializeMachineLearningDataFactoryCompute(element); + case "DataLakeAnalytics": return MachineLearningDataLakeAnalytics.DeserializeMachineLearningDataLakeAnalytics(element); + case "Databricks": return MachineLearningDatabricksCompute.DeserializeMachineLearningDatabricksCompute(element); + case "HDInsight": return MachineLearningHDInsightCompute.DeserializeMachineLearningHDInsightCompute(element); + case "Kubernetes": return MachineLearningKubernetesCompute.DeserializeMachineLearningKubernetesCompute(element); + case "SynapseSpark": return MachineLearningSynapseSpark.DeserializeMachineLearningSynapseSpark(element); + case "VirtualMachine": return MachineLearningVirtualMachineCompute.DeserializeMachineLearningVirtualMachineCompute(element); + } + } + return UnknownCompute.DeserializeUnknownCompute(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProperties.cs new file mode 100644 index 000000000000..582ec24e0001 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProperties.cs @@ -0,0 +1,134 @@ +// 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 +{ + /// + /// Machine Learning compute object. + /// Serialized Name: Compute + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningComputeProperties. + protected MachineLearningComputeProperties() + { + ProvisioningErrors = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningComputeProperties. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + internal MachineLearningComputeProperties(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) + { + ComputeType = computeType; + ComputeLocation = computeLocation; + ProvisioningState = provisioningState; + Description = description; + CreatedOn = createdOn; + ModifiedOn = modifiedOn; + ResourceId = resourceId; + ProvisioningErrors = provisioningErrors; + IsAttachedCompute = isAttachedCompute; + DisableLocalAuth = disableLocalAuth; + } + + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + internal ComputeType ComputeType { get; set; } + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + public string ComputeLocation { get; set; } + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + public MachineLearningProvisioningState? ProvisioningState { get; } + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + public string Description { get; set; } + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + public DateTimeOffset? CreatedOn { get; } + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + public DateTimeOffset? ModifiedOn { get; } + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + public ResourceIdentifier ResourceId { get; set; } + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + public IReadOnlyList ProvisioningErrors { get; } + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + public bool? IsAttachedCompute { get; } + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + public bool? DisableLocalAuth { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProvisioningStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProvisioningStatus.cs new file mode 100644 index 000000000000..0f813a61400f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeProvisioningStatus.cs @@ -0,0 +1,66 @@ +// 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 current deployment state of schedule. + /// Serialized Name: ProvisioningStatus + /// + public readonly partial struct MachineLearningComputeProvisioningStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningComputeProvisioningStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CompletedValue = "Completed"; + private const string ProvisioningValue = "Provisioning"; + private const string FailedValue = "Failed"; + + /// + /// Completed + /// Serialized Name: ProvisioningStatus.Completed + /// + public static MachineLearningComputeProvisioningStatus Completed { get; } = new MachineLearningComputeProvisioningStatus(CompletedValue); + /// + /// Provisioning + /// Serialized Name: ProvisioningStatus.Provisioning + /// + public static MachineLearningComputeProvisioningStatus Provisioning { get; } = new MachineLearningComputeProvisioningStatus(ProvisioningValue); + /// + /// Failed + /// Serialized Name: ProvisioningStatus.Failed + /// + public static MachineLearningComputeProvisioningStatus Failed { get; } = new MachineLearningComputeProvisioningStatus(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningComputeProvisioningStatus left, MachineLearningComputeProvisioningStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningComputeProvisioningStatus left, MachineLearningComputeProvisioningStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningComputeProvisioningStatus(string value) => new MachineLearningComputeProvisioningStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningComputeProvisioningStatus other && Equals(other); + /// + public bool Equals(MachineLearningComputeProvisioningStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSecrets.Serialization.cs new file mode 100644 index 000000000000..ed18ac76df44 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSecrets.Serialization.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeSecrets + { + internal static MachineLearningComputeSecrets DeserializeMachineLearningComputeSecrets(JsonElement element) + { + if (element.TryGetProperty("computeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AKS": return MachineLearningAksComputeSecrets.DeserializeMachineLearningAksComputeSecrets(element); + case "Databricks": return MachineLearningDatabricksComputeSecrets.DeserializeMachineLearningDatabricksComputeSecrets(element); + case "VirtualMachine": return MachineLearningVirtualMachineSecrets.DeserializeMachineLearningVirtualMachineSecrets(element); + } + } + return UnknownComputeSecrets.DeserializeUnknownComputeSecrets(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSecrets.cs new file mode 100644 index 000000000000..a6ffe88fdf0b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSecrets.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Secrets related to a Machine Learning compute. Might differ for every type of compute. + /// Serialized Name: ComputeSecrets + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningComputeSecrets + { + /// Initializes a new instance of MachineLearningComputeSecrets. + protected MachineLearningComputeSecrets() + { + } + + /// Initializes a new instance of MachineLearningComputeSecrets. + /// + /// The type of compute + /// Serialized Name: ComputeSecrets.computeType + /// + internal MachineLearningComputeSecrets(ComputeType computeType) + { + ComputeType = computeType; + } + + /// + /// The type of compute + /// Serialized Name: ComputeSecrets.computeType + /// + internal ComputeType ComputeType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs new file mode 100644 index 000000000000..32128c58f8d0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.Serialization.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeStartStopSchedule + { + internal static MachineLearningComputeStartStopSchedule DeserializeMachineLearningComputeStartStopSchedule(JsonElement element) + { + Optional id = default; + Optional provisioningStatus = default; + Optional status = default; + Optional action = default; + Optional triggerType = default; + Optional recurrence = default; + Optional cron = default; + Optional schedule = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningStatus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningStatus = new MachineLearningComputeProvisioningStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningScheduleStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("action")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + action = new MachineLearningComputePowerAction(property.Value.GetString()); + continue; + } + if (property.NameEquals("triggerType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + triggerType = new MachineLearningTriggerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("recurrence")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + recurrence = MachineLearningRecurrenceTrigger.DeserializeMachineLearningRecurrenceTrigger(property.Value); + continue; + } + if (property.NameEquals("cron")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + cron = CronTrigger.DeserializeCronTrigger(property.Value); + continue; + } + if (property.NameEquals("schedule")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + schedule = MachineLearningScheduleBase.DeserializeMachineLearningScheduleBase(property.Value); + continue; + } + } + return new MachineLearningComputeStartStopSchedule(id.Value, Optional.ToNullable(provisioningStatus), Optional.ToNullable(status), Optional.ToNullable(action), Optional.ToNullable(triggerType), recurrence.Value, cron.Value, schedule.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs new file mode 100644 index 000000000000..43a8e7ca5a20 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeStartStopSchedule.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Compute start stop schedule properties + /// Serialized Name: ComputeStartStopSchedule + /// + public partial class MachineLearningComputeStartStopSchedule + { + /// Initializes a new instance of MachineLearningComputeStartStopSchedule. + internal MachineLearningComputeStartStopSchedule() + { + } + + /// Initializes a new instance of MachineLearningComputeStartStopSchedule. + /// + /// A system assigned id for the schedule. + /// Serialized Name: ComputeStartStopSchedule.id + /// + /// + /// The current deployment state of schedule. + /// Serialized Name: ComputeStartStopSchedule.provisioningStatus + /// + /// + /// Is the schedule enabled or disabled? + /// Serialized Name: ComputeStartStopSchedule.status + /// + /// + /// [Required] The compute power action. + /// Serialized Name: ComputeStartStopSchedule.action + /// + /// + /// [Required] The schedule trigger type. + /// Serialized Name: ComputeStartStopSchedule.triggerType + /// + /// + /// Required if triggerType is Recurrence. + /// Serialized Name: ComputeStartStopSchedule.recurrence + /// + /// + /// Required if triggerType is Cron. + /// Serialized Name: ComputeStartStopSchedule.cron + /// + /// + /// [Deprecated] Not used any more. + /// Serialized Name: ComputeStartStopSchedule.schedule + /// + internal MachineLearningComputeStartStopSchedule(string id, MachineLearningComputeProvisioningStatus? provisioningStatus, MachineLearningScheduleStatus? status, MachineLearningComputePowerAction? action, MachineLearningTriggerType? triggerType, MachineLearningRecurrenceTrigger recurrence, CronTrigger cron, MachineLearningScheduleBase schedule) + { + Id = id; + ProvisioningStatus = provisioningStatus; + Status = status; + Action = action; + TriggerType = triggerType; + Recurrence = recurrence; + Cron = cron; + Schedule = schedule; + } + + /// + /// A system assigned id for the schedule. + /// Serialized Name: ComputeStartStopSchedule.id + /// + public string Id { get; } + /// + /// The current deployment state of schedule. + /// Serialized Name: ComputeStartStopSchedule.provisioningStatus + /// + public MachineLearningComputeProvisioningStatus? ProvisioningStatus { get; } + /// + /// Is the schedule enabled or disabled? + /// Serialized Name: ComputeStartStopSchedule.status + /// + public MachineLearningScheduleStatus? Status { get; } + /// + /// [Required] The compute power action. + /// Serialized Name: ComputeStartStopSchedule.action + /// + public MachineLearningComputePowerAction? Action { get; } + /// + /// [Required] The schedule trigger type. + /// Serialized Name: ComputeStartStopSchedule.triggerType + /// + public MachineLearningTriggerType? TriggerType { get; } + /// + /// Required if triggerType is Recurrence. + /// Serialized Name: ComputeStartStopSchedule.recurrence + /// + public MachineLearningRecurrenceTrigger Recurrence { get; } + /// + /// Required if triggerType is Cron. + /// Serialized Name: ComputeStartStopSchedule.cron + /// + public CronTrigger Cron { get; } + /// + /// [Deprecated] Not used any more. + /// Serialized Name: ComputeStartStopSchedule.schedule + /// + public MachineLearningScheduleBase Schedule { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSystemService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSystemService.Serialization.cs new file mode 100644 index 000000000000..22cf2ad9013f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSystemService.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningComputeSystemService + { + internal static MachineLearningComputeSystemService DeserializeMachineLearningComputeSystemService(JsonElement element) + { + Optional systemServiceType = default; + Optional publicIPAddress = default; + Optional version = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("systemServiceType")) + { + systemServiceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicIpAddress")) + { + publicIPAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("version")) + { + version = property.Value.GetString(); + continue; + } + } + return new MachineLearningComputeSystemService(systemServiceType.Value, publicIPAddress.Value, version.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSystemService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSystemService.cs new file mode 100644 index 000000000000..c983b06a22d7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningComputeSystemService.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// A system service running on a compute. + /// Serialized Name: SystemService + /// + public partial class MachineLearningComputeSystemService + { + /// Initializes a new instance of MachineLearningComputeSystemService. + internal MachineLearningComputeSystemService() + { + } + + /// Initializes a new instance of MachineLearningComputeSystemService. + /// + /// The type of this system service. + /// Serialized Name: SystemService.systemServiceType + /// + /// + /// Public IP address + /// Serialized Name: SystemService.publicIpAddress + /// + /// + /// The version for this type. + /// Serialized Name: SystemService.version + /// + internal MachineLearningComputeSystemService(string systemServiceType, string publicIPAddress, string version) + { + SystemServiceType = systemServiceType; + PublicIPAddress = publicIPAddress; + Version = version; + } + + /// + /// The type of this system service. + /// Serialized Name: SystemService.systemServiceType + /// + public string SystemServiceType { get; } + /// + /// Public IP address + /// Serialized Name: SystemService.publicIpAddress + /// + public string PublicIPAddress { get; } + /// + /// The version for this type. + /// Serialized Name: SystemService.version + /// + public string Version { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs new file mode 100644 index 000000000000..9e1c93418b48 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionAuthType.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Authentication type of the connection target + /// Serialized Name: ConnectionAuthType + /// + internal readonly partial struct MachineLearningConnectionAuthType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningConnectionAuthType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PatValue = "PAT"; + private const string ManagedIdentityValue = "ManagedIdentity"; + private const string UsernamePasswordValue = "UsernamePassword"; + private const string NoneValue = "None"; + private const string SasValue = "SAS"; + + /// + /// PAT + /// Serialized Name: ConnectionAuthType.PAT + /// + public static MachineLearningConnectionAuthType Pat { get; } = new MachineLearningConnectionAuthType(PatValue); + /// + /// ManagedIdentity + /// Serialized Name: ConnectionAuthType.ManagedIdentity + /// + public static MachineLearningConnectionAuthType ManagedIdentity { get; } = new MachineLearningConnectionAuthType(ManagedIdentityValue); + /// + /// UsernamePassword + /// Serialized Name: ConnectionAuthType.UsernamePassword + /// + public static MachineLearningConnectionAuthType UsernamePassword { get; } = new MachineLearningConnectionAuthType(UsernamePasswordValue); + /// + /// None + /// Serialized Name: ConnectionAuthType.None + /// + public static MachineLearningConnectionAuthType None { get; } = new MachineLearningConnectionAuthType(NoneValue); + /// + /// SAS + /// Serialized Name: ConnectionAuthType.SAS + /// + public static MachineLearningConnectionAuthType Sas { get; } = new MachineLearningConnectionAuthType(SasValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningConnectionAuthType left, MachineLearningConnectionAuthType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningConnectionAuthType left, MachineLearningConnectionAuthType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningConnectionAuthType(string value) => new MachineLearningConnectionAuthType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningConnectionAuthType other && Equals(other); + /// + public bool Equals(MachineLearningConnectionAuthType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _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 new file mode 100644 index 000000000000..e410f3ff3f0c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningConnectionCategory.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Category of the connection + /// Serialized Name: ConnectionCategory + /// + public readonly partial struct MachineLearningConnectionCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningConnectionCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PythonFeedValue = "PythonFeed"; + private const string ContainerRegistryValue = "ContainerRegistry"; + private const string GitValue = "Git"; + + /// + /// PythonFeed + /// Serialized Name: ConnectionCategory.PythonFeed + /// + public static MachineLearningConnectionCategory PythonFeed { get; } = new MachineLearningConnectionCategory(PythonFeedValue); + /// + /// ContainerRegistry + /// Serialized Name: ConnectionCategory.ContainerRegistry + /// + public static MachineLearningConnectionCategory ContainerRegistry { get; } = new MachineLearningConnectionCategory(ContainerRegistryValue); + /// + /// Git + /// Serialized Name: ConnectionCategory.Git + /// + public static MachineLearningConnectionCategory Git { get; } = new MachineLearningConnectionCategory(GitValue); + /// 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. + public static bool operator !=(MachineLearningConnectionCategory left, MachineLearningConnectionCategory right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningConnectionCategory(string value) => new MachineLearningConnectionCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningConnectionCategory other && Equals(other); + /// + public bool Equals(MachineLearningConnectionCategory other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..30a7e2056f80 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningContainerRegistryCredentials + { + internal static MachineLearningContainerRegistryCredentials DeserializeMachineLearningContainerRegistryCredentials(JsonElement element) + { + Optional location = default; + Optional username = default; + Optional> passwords = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("location")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("passwords")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningPasswordDetail.DeserializeMachineLearningPasswordDetail(item)); + } + passwords = array; + continue; + } + } + return new MachineLearningContainerRegistryCredentials(Optional.ToNullable(location), username.Value, Optional.ToList(passwords)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs new file mode 100644 index 000000000000..b1cc0825d0bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerRegistryCredentials.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningContainerRegistryCredentials. + /// Serialized Name: RegistryListCredentialsResult + /// + public partial class MachineLearningContainerRegistryCredentials + { + /// Initializes a new instance of MachineLearningContainerRegistryCredentials. + internal MachineLearningContainerRegistryCredentials() + { + Passwords = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningContainerRegistryCredentials. + /// Serialized Name: RegistryListCredentialsResult.location. + /// Serialized Name: RegistryListCredentialsResult.username. + /// Serialized Name: RegistryListCredentialsResult.passwords. + internal MachineLearningContainerRegistryCredentials(AzureLocation? location, string username, IReadOnlyList passwords) + { + Location = location; + Username = username; + Passwords = passwords; + } + + /// Serialized Name: RegistryListCredentialsResult.location. + public AzureLocation? Location { get; } + /// Serialized Name: RegistryListCredentialsResult.username. + public string Username { get; } + /// Serialized Name: RegistryListCredentialsResult.passwords. + public IReadOnlyList Passwords { 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 new file mode 100644 index 000000000000..a79fd22e8266 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningContainerResourceRequirements : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerResourceLimits)) + { + if (ContainerResourceLimits != null) + { + writer.WritePropertyName("containerResourceLimits"); + writer.WriteObjectValue(ContainerResourceLimits); + } + else + { + writer.WriteNull("containerResourceLimits"); + } + } + if (Optional.IsDefined(ContainerResourceRequests)) + { + if (ContainerResourceRequests != null) + { + writer.WritePropertyName("containerResourceRequests"); + writer.WriteObjectValue(ContainerResourceRequests); + } + else + { + writer.WriteNull("containerResourceRequests"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningContainerResourceRequirements DeserializeMachineLearningContainerResourceRequirements(JsonElement element) + { + Optional containerResourceLimits = default; + Optional containerResourceRequests = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerResourceLimits")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containerResourceLimits = null; + continue; + } + containerResourceLimits = MachineLearningContainerResourceSettings.DeserializeMachineLearningContainerResourceSettings(property.Value); + continue; + } + if (property.NameEquals("containerResourceRequests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containerResourceRequests = null; + continue; + } + containerResourceRequests = MachineLearningContainerResourceSettings.DeserializeMachineLearningContainerResourceSettings(property.Value); + continue; + } + } + return new MachineLearningContainerResourceRequirements(containerResourceLimits.Value, containerResourceRequests.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs new file mode 100644 index 000000000000..0d9f27a2b6c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceRequirements.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Resource requirements for each container instance within an online deployment. + /// Serialized Name: ContainerResourceRequirements + /// + public partial class MachineLearningContainerResourceRequirements + { + /// Initializes a new instance of MachineLearningContainerResourceRequirements. + public MachineLearningContainerResourceRequirements() + { + } + + /// Initializes a new instance of MachineLearningContainerResourceRequirements. + /// + /// Container resource limit info: + /// Serialized Name: ContainerResourceRequirements.containerResourceLimits + /// + /// + /// Container resource request info: + /// Serialized Name: ContainerResourceRequirements.containerResourceRequests + /// + internal MachineLearningContainerResourceRequirements(MachineLearningContainerResourceSettings containerResourceLimits, MachineLearningContainerResourceSettings containerResourceRequests) + { + ContainerResourceLimits = containerResourceLimits; + ContainerResourceRequests = containerResourceRequests; + } + + /// + /// Container resource limit info: + /// Serialized Name: ContainerResourceRequirements.containerResourceLimits + /// + public MachineLearningContainerResourceSettings ContainerResourceLimits { get; set; } + /// + /// Container resource request info: + /// Serialized Name: ContainerResourceRequirements.containerResourceRequests + /// + public MachineLearningContainerResourceSettings ContainerResourceRequests { 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 new file mode 100644 index 000000000000..39cda4dc44bc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.Serialization.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningContainerResourceSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Cpu)) + { + if (Cpu != null) + { + writer.WritePropertyName("cpu"); + writer.WriteStringValue(Cpu); + } + else + { + writer.WriteNull("cpu"); + } + } + if (Optional.IsDefined(Gpu)) + { + if (Gpu != null) + { + writer.WritePropertyName("gpu"); + writer.WriteStringValue(Gpu); + } + else + { + writer.WriteNull("gpu"); + } + } + if (Optional.IsDefined(Memory)) + { + if (Memory != null) + { + writer.WritePropertyName("memory"); + writer.WriteStringValue(Memory); + } + else + { + writer.WriteNull("memory"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningContainerResourceSettings DeserializeMachineLearningContainerResourceSettings(JsonElement element) + { + Optional cpu = default; + Optional gpu = default; + Optional memory = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cpu")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + cpu = null; + continue; + } + cpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("gpu")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + gpu = null; + continue; + } + gpu = property.Value.GetString(); + continue; + } + if (property.NameEquals("memory")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + memory = null; + continue; + } + memory = property.Value.GetString(); + continue; + } + } + return new MachineLearningContainerResourceSettings(cpu.Value, gpu.Value, memory.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs new file mode 100644 index 000000000000..bf23d4b748ab --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerResourceSettings.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningContainerResourceSettings. + /// Serialized Name: ContainerResourceSettings + /// + public partial class MachineLearningContainerResourceSettings + { + /// Initializes a new instance of MachineLearningContainerResourceSettings. + public MachineLearningContainerResourceSettings() + { + } + + /// Initializes a new instance of MachineLearningContainerResourceSettings. + /// + /// Number of vCPUs request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Serialized Name: ContainerResourceSettings.cpu + /// + /// + /// Number of Nvidia GPU cards request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Serialized Name: ContainerResourceSettings.gpu + /// + /// + /// Memory size request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Serialized Name: ContainerResourceSettings.memory + /// + internal MachineLearningContainerResourceSettings(string cpu, string gpu, string memory) + { + Cpu = cpu; + Gpu = gpu; + Memory = memory; + } + + /// + /// Number of vCPUs request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Serialized Name: ContainerResourceSettings.cpu + /// + public string Cpu { get; set; } + /// + /// Number of Nvidia GPU cards request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Serialized Name: ContainerResourceSettings.gpu + /// + public string Gpu { get; set; } + /// + /// Memory size request/limit for container. More info: + /// https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + /// Serialized Name: ContainerResourceSettings.memory + /// + public string Memory { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs new file mode 100644 index 000000000000..5258806dcbd1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningContainerType.cs @@ -0,0 +1,60 @@ +// 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 MachineLearningContainerType. + /// Serialized Name: ContainerType + /// + public readonly partial struct MachineLearningContainerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningContainerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StorageInitializerValue = "StorageInitializer"; + private const string InferenceServerValue = "InferenceServer"; + + /// + /// StorageInitializer + /// Serialized Name: ContainerType.StorageInitializer + /// + public static MachineLearningContainerType StorageInitializer { get; } = new MachineLearningContainerType(StorageInitializerValue); + /// + /// InferenceServer + /// Serialized Name: ContainerType.InferenceServer + /// + public static MachineLearningContainerType InferenceServer { get; } = new MachineLearningContainerType(InferenceServerValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningContainerType left, MachineLearningContainerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningContainerType left, MachineLearningContainerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningContainerType(string value) => new MachineLearningContainerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningContainerType other && Equals(other); + /// + public bool Equals(MachineLearningContainerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..63e45f1783bf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCustomModelJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningCustomModelJobInput DeserializeMachineLearningCustomModelJobInput(JsonElement element) + { + Optional mode = default; + Uri uri = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningCustomModelJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs new file mode 100644 index 000000000000..eff464df152e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningCustomModelJobInput. + /// Serialized Name: CustomModelJobInput + /// + public partial class MachineLearningCustomModelJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningCustomModelJobInput. + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + /// is null. + public MachineLearningCustomModelJobInput(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + JobInputType = JobInputType.CustomModel; + } + + /// Initializes a new instance of MachineLearningCustomModelJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + internal MachineLearningCustomModelJobInput(string description, JobInputType jobInputType, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType) + { + Mode = mode; + Uri = uri; + JobInputType = jobInputType; + } + + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + public MachineLearningInputDeliveryMode? Mode { get; set; } + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..42c1dd210281 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningCustomModelJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningCustomModelJobOutput DeserializeMachineLearningCustomModelJobOutput(JsonElement element) + { + Optional mode = default; + Optional uri = default; + Optional description = default; + JobOutputType jobOutputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutputType")) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningCustomModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs new file mode 100644 index 000000000000..901060f12dbf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningCustomModelJobOutput.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningCustomModelJobOutput. + /// Serialized Name: CustomModelJobOutput + /// + public partial class MachineLearningCustomModelJobOutput : MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningCustomModelJobOutput. + public MachineLearningCustomModelJobOutput() + { + JobOutputType = JobOutputType.CustomModel; + } + + /// Initializes a new instance of MachineLearningCustomModelJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + internal MachineLearningCustomModelJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + { + Mode = mode; + Uri = uri; + JobOutputType = jobOutputType; + } + + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + public MachineLearningOutputDeliveryMode? Mode { get; set; } + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerData.Serialization.cs new file mode 100644 index 000000000000..21709823ca6d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningDataContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningDataContainerData DeserializeMachineLearningDataContainerData(JsonElement element) + { + MachineLearningDataContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningDataContainerProperties.DeserializeMachineLearningDataContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningDataContainerData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..372c686075fc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.Serialization.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDataContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"); + writer.WriteStringValue(DataType.ToString()); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningDataContainerProperties DeserializeMachineLearningDataContainerProperties(JsonElement element) + { + MachineLearningDataType dataType = default; + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType")) + { + dataType = new MachineLearningDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningDataContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value, dataType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs new file mode 100644 index 000000000000..980ef7048c7b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataContainerProperties.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Container for data asset versions. + /// Serialized Name: DataContainer + /// + public partial class MachineLearningDataContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningDataContainerProperties. + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataContainer.dataType + /// + public MachineLearningDataContainerProperties(MachineLearningDataType dataType) + { + DataType = dataType; + } + + /// Initializes a new instance of MachineLearningDataContainerProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataContainer.dataType + /// + internal MachineLearningDataContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion, MachineLearningDataType dataType) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + DataType = dataType; + } + + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataContainer.dataType + /// + public MachineLearningDataType DataType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataFactoryCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataFactoryCompute.Serialization.cs new file mode 100644 index 000000000000..66937e9062dc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataFactoryCompute.Serialization.cs @@ -0,0 +1,172 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDataFactoryCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningDataFactoryCompute DeserializeMachineLearningDataFactoryCompute(JsonElement element) + { + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningDataFactoryCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataFactoryCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataFactoryCompute.cs new file mode 100644 index 000000000000..a3423386e1e1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataFactoryCompute.cs @@ -0,0 +1,72 @@ +// 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 +{ + /// + /// A DataFactory compute. + /// Serialized Name: DataFactory + /// + public partial class MachineLearningDataFactoryCompute : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningDataFactoryCompute. + public MachineLearningDataFactoryCompute() + { + ComputeType = ComputeType.DataFactory; + } + + /// Initializes a new instance of MachineLearningDataFactoryCompute. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + internal MachineLearningDataFactoryCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + ComputeType = computeType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalytics.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalytics.Serialization.cs new file mode 100644 index 000000000000..f88e5fcd1aa8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalytics.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDataLakeAnalytics : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningDataLakeAnalytics DeserializeMachineLearningDataLakeAnalytics(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningDataLakeAnalyticsProperties.DeserializeMachineLearningDataLakeAnalyticsProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningDataLakeAnalytics(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalytics.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalytics.cs new file mode 100644 index 000000000000..78d2083239b7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalytics.cs @@ -0,0 +1,91 @@ +// 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 +{ + /// + /// A DataLakeAnalytics compute. + /// Serialized Name: DataLakeAnalytics + /// + public partial class MachineLearningDataLakeAnalytics : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningDataLakeAnalytics. + public MachineLearningDataLakeAnalytics() + { + ComputeType = ComputeType.DataLakeAnalytics; + } + + /// Initializes a new instance of MachineLearningDataLakeAnalytics. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// Serialized Name: DataLakeAnalyticsSchema.properties. + internal MachineLearningDataLakeAnalytics(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningDataLakeAnalyticsProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// Serialized Name: DataLakeAnalyticsSchema.properties. + internal MachineLearningDataLakeAnalyticsProperties Properties { get; set; } + /// + /// DataLake Store Account Name + /// Serialized Name: DataLakeAnalyticsSchemaProperties.dataLakeStoreAccountName + /// + public string DataLakeStoreAccountName + { + get => Properties is null ? default : Properties.DataLakeStoreAccountName; + set + { + if (Properties is null) + Properties = new MachineLearningDataLakeAnalyticsProperties(); + Properties.DataLakeStoreAccountName = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalyticsProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalyticsProperties.Serialization.cs new file mode 100644 index 000000000000..68fa0997a91b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalyticsProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + internal partial class MachineLearningDataLakeAnalyticsProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DataLakeStoreAccountName)) + { + writer.WritePropertyName("dataLakeStoreAccountName"); + writer.WriteStringValue(DataLakeStoreAccountName); + } + writer.WriteEndObject(); + } + + internal static MachineLearningDataLakeAnalyticsProperties DeserializeMachineLearningDataLakeAnalyticsProperties(JsonElement element) + { + Optional dataLakeStoreAccountName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataLakeStoreAccountName")) + { + dataLakeStoreAccountName = property.Value.GetString(); + continue; + } + } + return new MachineLearningDataLakeAnalyticsProperties(dataLakeStoreAccountName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalyticsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalyticsProperties.cs new file mode 100644 index 000000000000..b6da492b06eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataLakeAnalyticsProperties.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningDataLakeAnalyticsProperties. + /// Serialized Name: DataLakeAnalyticsSchemaProperties + /// + internal partial class MachineLearningDataLakeAnalyticsProperties + { + /// Initializes a new instance of MachineLearningDataLakeAnalyticsProperties. + public MachineLearningDataLakeAnalyticsProperties() + { + } + + /// Initializes a new instance of MachineLearningDataLakeAnalyticsProperties. + /// + /// DataLake Store Account Name + /// Serialized Name: DataLakeAnalyticsSchemaProperties.dataLakeStoreAccountName + /// + internal MachineLearningDataLakeAnalyticsProperties(string dataLakeStoreAccountName) + { + DataLakeStoreAccountName = dataLakeStoreAccountName; + } + + /// + /// DataLake Store Account Name + /// Serialized Name: DataLakeAnalyticsSchemaProperties.dataLakeStoreAccountName + /// + public string DataLakeStoreAccountName { get; set; } + } +} 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 new file mode 100644 index 000000000000..3dc499fb1a65 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDataPathAssetReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DatastoreId)) + { + if (DatastoreId != null) + { + writer.WritePropertyName("datastoreId"); + writer.WriteStringValue(DatastoreId); + } + else + { + writer.WriteNull("datastoreId"); + } + } + if (Optional.IsDefined(Path)) + { + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteStringValue(Path); + } + else + { + writer.WriteNull("path"); + } + } + writer.WritePropertyName("referenceType"); + writer.WriteStringValue(ReferenceType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningDataPathAssetReference DeserializeMachineLearningDataPathAssetReference(JsonElement element) + { + Optional datastoreId = default; + Optional path = default; + ReferenceType referenceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datastoreId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + datastoreId = null; + continue; + } + datastoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("path")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + path = null; + continue; + } + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceType")) + { + referenceType = new ReferenceType(property.Value.GetString()); + continue; + } + } + return new MachineLearningDataPathAssetReference(referenceType, datastoreId.Value, path.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs new file mode 100644 index 000000000000..6b4cf39f3dd6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataPathAssetReference.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Reference to an asset via its path in a datastore. + /// Serialized Name: DataPathAssetReference + /// + public partial class MachineLearningDataPathAssetReference : MachineLearningAssetReferenceBase + { + /// Initializes a new instance of MachineLearningDataPathAssetReference. + public MachineLearningDataPathAssetReference() + { + ReferenceType = ReferenceType.DataPath; + } + + /// Initializes a new instance of MachineLearningDataPathAssetReference. + /// + /// [Required] Specifies the type of asset reference. + /// Serialized Name: AssetReferenceBase.referenceType + /// + /// + /// ARM resource ID of the datastore where the asset is located. + /// Serialized Name: DataPathAssetReference.datastoreId + /// + /// + /// The path of the file/directory in the datastore. + /// Serialized Name: DataPathAssetReference.path + /// + internal MachineLearningDataPathAssetReference(ReferenceType referenceType, string datastoreId, string path) : base(referenceType) + { + DatastoreId = datastoreId; + Path = path; + ReferenceType = referenceType; + } + + /// + /// ARM resource ID of the datastore where the asset is located. + /// Serialized Name: DataPathAssetReference.datastoreId + /// + public string DatastoreId { get; set; } + /// + /// The path of the file/directory in the datastore. + /// Serialized Name: DataPathAssetReference.path + /// + public string Path { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataType.cs new file mode 100644 index 000000000000..6a9c1cc1bd08 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataType.cs @@ -0,0 +1,66 @@ +// 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 data. + /// Serialized Name: DataType + /// + public readonly partial struct MachineLearningDataType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningDataType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UriFileValue = "uri_file"; + private const string UriFolderValue = "uri_folder"; + private const string MltableValue = "mltable"; + + /// + /// uri_file + /// Serialized Name: DataType.uri_file + /// + public static MachineLearningDataType UriFile { get; } = new MachineLearningDataType(UriFileValue); + /// + /// uri_folder + /// Serialized Name: DataType.uri_folder + /// + public static MachineLearningDataType UriFolder { get; } = new MachineLearningDataType(UriFolderValue); + /// + /// mltable + /// Serialized Name: DataType.mltable + /// + public static MachineLearningDataType Mltable { get; } = new MachineLearningDataType(MltableValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningDataType left, MachineLearningDataType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningDataType left, MachineLearningDataType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningDataType(string value) => new MachineLearningDataType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningDataType other && Equals(other); + /// + public bool Equals(MachineLearningDataType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionData.Serialization.cs new file mode 100644 index 000000000000..d14b4158bf76 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningDataVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningDataVersionData DeserializeMachineLearningDataVersionData(JsonElement element) + { + MachineLearningDataVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningDataVersionProperties.DeserializeMachineLearningDataVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningDataVersionData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..dc0ccffb7569 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.Serialization.cs @@ -0,0 +1,193 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDataVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"); + writer.WriteStringValue(DataType.ToString()); + writer.WritePropertyName("dataUri"); + writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningDataVersionProperties DeserializeMachineLearningDataVersionProperties(JsonElement element) + { + if (element.TryGetProperty("dataType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "mltable": return MachineLearningTable.DeserializeMachineLearningTable(element); + case "uri_file": return MachineLearningUriFileDataVersion.DeserializeMachineLearningUriFileDataVersion(element); + case "uri_folder": return MachineLearningUriFolderDataVersion.DeserializeMachineLearningUriFolderDataVersion(element); + } + } + MachineLearningDataType dataType = default; + Uri dataUri = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType")) + { + dataType = new MachineLearningDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataUri")) + { + dataUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningDataVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs new file mode 100644 index 000000000000..c1ba905e9f00 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDataVersionProperties.cs @@ -0,0 +1,81 @@ +// 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 +{ + /// + /// Data version base definition + /// Serialized Name: DataVersionBase + /// Please note is the base class. According to the scenario, a derived class 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 partial class MachineLearningDataVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningDataVersionProperties. + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + /// is null. + public MachineLearningDataVersionProperties(Uri dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + DataUri = dataUri; + } + + /// Initializes a new instance of MachineLearningDataVersionProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataVersionBase.dataType + /// + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + internal MachineLearningDataVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived) + { + DataType = dataType; + DataUri = dataUri; + } + + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataVersionBase.dataType + /// + internal MachineLearningDataType DataType { get; set; } + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + public Uri DataUri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksCompute.Serialization.cs new file mode 100644 index 000000000000..9c26924c0c9c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksCompute.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDatabricksCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningDatabricksCompute DeserializeMachineLearningDatabricksCompute(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningDatabricksProperties.DeserializeMachineLearningDatabricksProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningDatabricksCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksCompute.cs new file mode 100644 index 000000000000..ead90442bba7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksCompute.cs @@ -0,0 +1,83 @@ +// 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 +{ + /// + /// A DataFactory compute. + /// Serialized Name: Databricks + /// + public partial class MachineLearningDatabricksCompute : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningDatabricksCompute. + public MachineLearningDatabricksCompute() + { + ComputeType = ComputeType.Databricks; + } + + /// Initializes a new instance of MachineLearningDatabricksCompute. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// + /// Properties of Databricks + /// Serialized Name: DatabricksSchema.properties + /// + internal MachineLearningDatabricksCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningDatabricksProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// + /// Properties of Databricks + /// Serialized Name: DatabricksSchema.properties + /// + public MachineLearningDatabricksProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksComputeSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksComputeSecrets.Serialization.cs new file mode 100644 index 000000000000..2bf4342b8b00 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksComputeSecrets.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDatabricksComputeSecrets + { + internal static MachineLearningDatabricksComputeSecrets DeserializeMachineLearningDatabricksComputeSecrets(JsonElement element) + { + Optional databricksAccessToken = default; + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databricksAccessToken")) + { + databricksAccessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new MachineLearningDatabricksComputeSecrets(computeType, databricksAccessToken.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksComputeSecrets.cs new file mode 100644 index 000000000000..9106f7481ec2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksComputeSecrets.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Secrets related to a Machine Learning compute based on Databricks. + /// Serialized Name: DatabricksComputeSecrets + /// + public partial class MachineLearningDatabricksComputeSecrets : MachineLearningComputeSecrets + { + /// Initializes a new instance of MachineLearningDatabricksComputeSecrets. + internal MachineLearningDatabricksComputeSecrets() + { + ComputeType = ComputeType.Databricks; + } + + /// Initializes a new instance of MachineLearningDatabricksComputeSecrets. + /// + /// The type of compute + /// Serialized Name: ComputeSecrets.computeType + /// + /// + /// access token for databricks account. + /// Serialized Name: DatabricksComputeSecretsProperties.databricksAccessToken + /// + internal MachineLearningDatabricksComputeSecrets(ComputeType computeType, string databricksAccessToken) : base(computeType) + { + DatabricksAccessToken = databricksAccessToken; + ComputeType = computeType; + } + + /// + /// access token for databricks account. + /// Serialized Name: DatabricksComputeSecretsProperties.databricksAccessToken + /// + public string DatabricksAccessToken { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksProperties.Serialization.cs new file mode 100644 index 000000000000..9a10c055e589 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDatabricksProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DatabricksAccessToken)) + { + writer.WritePropertyName("databricksAccessToken"); + writer.WriteStringValue(DatabricksAccessToken); + } + if (Optional.IsDefined(WorkspaceUri)) + { + writer.WritePropertyName("workspaceUrl"); + writer.WriteStringValue(WorkspaceUri.AbsoluteUri); + } + writer.WriteEndObject(); + } + + internal static MachineLearningDatabricksProperties DeserializeMachineLearningDatabricksProperties(JsonElement element) + { + Optional databricksAccessToken = default; + Optional workspaceUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("databricksAccessToken")) + { + databricksAccessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("workspaceUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + workspaceUrl = null; + continue; + } + workspaceUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new MachineLearningDatabricksProperties(databricksAccessToken.Value, workspaceUrl.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksProperties.cs new file mode 100644 index 000000000000..f0f021a4c1cd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatabricksProperties.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Properties of Databricks + /// Serialized Name: DatabricksProperties + /// + public partial class MachineLearningDatabricksProperties + { + /// Initializes a new instance of MachineLearningDatabricksProperties. + public MachineLearningDatabricksProperties() + { + } + + /// Initializes a new instance of MachineLearningDatabricksProperties. + /// + /// Databricks access token + /// Serialized Name: DatabricksProperties.databricksAccessToken + /// + /// + /// Workspace Url + /// Serialized Name: DatabricksProperties.workspaceUrl + /// + internal MachineLearningDatabricksProperties(string databricksAccessToken, Uri workspaceUri) + { + DatabricksAccessToken = databricksAccessToken; + WorkspaceUri = workspaceUri; + } + + /// + /// Databricks access token + /// Serialized Name: DatabricksProperties.databricksAccessToken + /// + public string DatabricksAccessToken { get; set; } + /// + /// Workspace Url + /// Serialized Name: DatabricksProperties.workspaceUrl + /// + public Uri WorkspaceUri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs new file mode 100644 index 000000000000..f609d78d402f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentialsType"); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningDatastoreCredentials DeserializeMachineLearningDatastoreCredentials(JsonElement element) + { + if (element.TryGetProperty("credentialsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AccountKey": return MachineLearningAccountKeyDatastoreCredentials.DeserializeMachineLearningAccountKeyDatastoreCredentials(element); + case "Certificate": return MachineLearningCertificateDatastoreCredentials.DeserializeMachineLearningCertificateDatastoreCredentials(element); + case "None": return MachineLearningNoneDatastoreCredentials.DeserializeMachineLearningNoneDatastoreCredentials(element); + case "Sas": return MachineLearningSasDatastoreCredentials.DeserializeMachineLearningSasDatastoreCredentials(element); + case "ServicePrincipal": return MachineLearningServicePrincipalDatastoreCredentials.DeserializeMachineLearningServicePrincipalDatastoreCredentials(element); + } + } + return UnknownDatastoreCredentials.DeserializeUnknownDatastoreCredentials(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs new file mode 100644 index 000000000000..94b729465244 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreCredentials.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Base definition for datastore credentials. + /// Serialized Name: DatastoreCredentials + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningDatastoreCredentials + { + /// Initializes a new instance of MachineLearningDatastoreCredentials. + protected MachineLearningDatastoreCredentials() + { + } + + /// Initializes a new instance of MachineLearningDatastoreCredentials. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + internal MachineLearningDatastoreCredentials(CredentialsType credentialsType) + { + CredentialsType = credentialsType; + } + + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + internal CredentialsType CredentialsType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreData.Serialization.cs new file mode 100644 index 000000000000..6014e0ae485c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningDatastoreData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningDatastoreData DeserializeMachineLearningDatastoreData(JsonElement element) + { + MachineLearningDatastoreProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningDatastoreProperties.DeserializeMachineLearningDatastoreProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningDatastoreData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..a6b823735e03 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.Serialization.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDatastoreProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + writer.WritePropertyName("datastoreType"); + writer.WriteStringValue(DatastoreType.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningDatastoreProperties DeserializeMachineLearningDatastoreProperties(JsonElement element) + { + if (element.TryGetProperty("datastoreType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureBlob": return MachineLearningAzureBlobDatastore.DeserializeMachineLearningAzureBlobDatastore(element); + case "AzureDataLakeGen1": return MachineLearningAzureDataLakeGen1Datastore.DeserializeMachineLearningAzureDataLakeGen1Datastore(element); + case "AzureDataLakeGen2": return MachineLearningAzureDataLakeGen2Datastore.DeserializeMachineLearningAzureDataLakeGen2Datastore(element); + case "AzureFile": return MachineLearningAzureFileDatastore.DeserializeMachineLearningAzureFileDatastore(element); + } + } + MachineLearningDatastoreCredentials credentials = default; + DatastoreType datastoreType = default; + Optional isDefault = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + credentials = MachineLearningDatastoreCredentials.DeserializeMachineLearningDatastoreCredentials(property.Value); + continue; + } + if (property.NameEquals("datastoreType")) + { + datastoreType = new DatastoreType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isDefault")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningDatastoreProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), credentials, datastoreType, Optional.ToNullable(isDefault)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs new file mode 100644 index 000000000000..e211c1a34d2d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreProperties.cs @@ -0,0 +1,89 @@ +// 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 +{ + /// + /// Base definition for datastore contents configuration. + /// Serialized Name: 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 , , and . + /// + public partial class MachineLearningDatastoreProperties : MachineLearningResourceBase + { + /// Initializes a new instance of MachineLearningDatastoreProperties. + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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 . + /// + /// is null. + public MachineLearningDatastoreProperties(MachineLearningDatastoreCredentials credentials) + { + Argument.AssertNotNull(credentials, nameof(credentials)); + + Credentials = credentials; + } + + /// Initializes a new instance of MachineLearningDatastoreProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: Datastore.datastoreType + /// + /// + /// Readonly property to indicate if datastore is the workspace default datastore + /// Serialized Name: Datastore.isDefault + /// + internal MachineLearningDatastoreProperties(string description, IDictionary properties, IDictionary tags, MachineLearningDatastoreCredentials credentials, DatastoreType datastoreType, bool? isDefault) : base(description, properties, tags) + { + Credentials = credentials; + DatastoreType = datastoreType; + IsDefault = isDefault; + } + + /// + /// [Required] Account credentials. + /// Serialized Name: Datastore.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. + /// Serialized Name: Datastore.datastoreType + /// + internal DatastoreType DatastoreType { get; set; } + /// + /// Readonly property to indicate if datastore is the workspace default datastore + /// Serialized Name: Datastore.isDefault + /// + public bool? IsDefault { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs new file mode 100644 index 000000000000..e05852def257 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDatastoreSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("secretsType"); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningDatastoreSecrets DeserializeMachineLearningDatastoreSecrets(JsonElement element) + { + if (element.TryGetProperty("secretsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Certificate": return MachineLearningCertificateDatastoreSecrets.DeserializeMachineLearningCertificateDatastoreSecrets(element); + case "Sas": return MachineLearningSasDatastoreSecrets.DeserializeMachineLearningSasDatastoreSecrets(element); + case "ServicePrincipal": return MachineLearningServicePrincipalDatastoreSecrets.DeserializeMachineLearningServicePrincipalDatastoreSecrets(element); + case "AccountKey": return MachineLearningAccountKeyDatastoreSecrets.DeserializeMachineLearningAccountKeyDatastoreSecrets(element); + } + } + return UnknownDatastoreSecrets.DeserializeUnknownDatastoreSecrets(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs new file mode 100644 index 000000000000..9be9243400a9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDatastoreSecrets.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Base definition for datastore secrets. + /// Serialized Name: DatastoreSecrets + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningDatastoreSecrets + { + /// Initializes a new instance of MachineLearningDatastoreSecrets. + protected MachineLearningDatastoreSecrets() + { + } + + /// Initializes a new instance of MachineLearningDatastoreSecrets. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// + internal MachineLearningDatastoreSecrets(SecretsType secretsType) + { + SecretsType = secretsType; + } + + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// + internal SecretsType SecretsType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDefaultScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDefaultScaleSettings.Serialization.cs new file mode 100644 index 000000000000..da701177a9ed --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDefaultScaleSettings.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDefaultScaleSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("scaleType"); + writer.WriteStringValue(ScaleType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningDefaultScaleSettings DeserializeMachineLearningDefaultScaleSettings(JsonElement element) + { + ScaleType scaleType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scaleType")) + { + scaleType = new ScaleType(property.Value.GetString()); + continue; + } + } + return new MachineLearningDefaultScaleSettings(scaleType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDefaultScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDefaultScaleSettings.cs new file mode 100644 index 000000000000..95d307ac30e9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDefaultScaleSettings.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningDefaultScaleSettings. + /// Serialized Name: DefaultScaleSettings + /// + public partial class MachineLearningDefaultScaleSettings : MachineLearningOnlineScaleSettings + { + /// Initializes a new instance of MachineLearningDefaultScaleSettings. + public MachineLearningDefaultScaleSettings() + { + ScaleType = ScaleType.Default; + } + + /// Initializes a new instance of MachineLearningDefaultScaleSettings. + /// + /// [Required] Type of deployment scaling algorithm + /// Serialized Name: OnlineScaleSettings.scaleType + /// + internal MachineLearningDefaultScaleSettings(ScaleType scaleType) : base(scaleType) + { + ScaleType = scaleType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogs.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogs.Serialization.cs new file mode 100644 index 000000000000..bfa601201962 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogs.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDeploymentLogs + { + internal static MachineLearningDeploymentLogs DeserializeMachineLearningDeploymentLogs(JsonElement element) + { + Optional content = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("content")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + content = null; + continue; + } + content = property.Value.GetString(); + continue; + } + } + return new MachineLearningDeploymentLogs(content.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogs.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogs.cs new file mode 100644 index 000000000000..1774204664c5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogs.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningDeploymentLogs. + /// Serialized Name: DeploymentLogs + /// + public partial class MachineLearningDeploymentLogs + { + /// Initializes a new instance of MachineLearningDeploymentLogs. + internal MachineLearningDeploymentLogs() + { + } + + /// Initializes a new instance of MachineLearningDeploymentLogs. + /// + /// The retrieved online deployment logs. + /// Serialized Name: DeploymentLogs.content + /// + internal MachineLearningDeploymentLogs(string content) + { + Content = content; + } + + /// + /// The retrieved online deployment logs. + /// Serialized Name: DeploymentLogs.content + /// + public string Content { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogsContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogsContent.Serialization.cs new file mode 100644 index 000000000000..d332439985d1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogsContent.Serialization.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDeploymentLogsContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerType)) + { + writer.WritePropertyName("containerType"); + writer.WriteStringValue(ContainerType.Value.ToString()); + } + if (Optional.IsDefined(Tail)) + { + if (Tail != null) + { + writer.WritePropertyName("tail"); + writer.WriteNumberValue(Tail.Value); + } + else + { + writer.WriteNull("tail"); + } + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogsContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogsContent.cs new file mode 100644 index 000000000000..50e7a38f1449 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentLogsContent.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningDeploymentLogsContent. + /// Serialized Name: DeploymentLogsRequest + /// + public partial class MachineLearningDeploymentLogsContent + { + /// Initializes a new instance of MachineLearningDeploymentLogsContent. + public MachineLearningDeploymentLogsContent() + { + } + + /// + /// The type of container to retrieve logs from. + /// Serialized Name: DeploymentLogsRequest.containerType + /// + public MachineLearningContainerType? ContainerType { get; set; } + /// + /// The maximum number of lines to tail. + /// Serialized Name: DeploymentLogsRequest.tail + /// + public int? Tail { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentProvisioningState.cs new file mode 100644 index 000000000000..480715dc57b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentProvisioningState.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Possible values for DeploymentProvisioningState. + /// Serialized Name: DeploymentProvisioningState + /// + public readonly partial struct MachineLearningDeploymentProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningDeploymentProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string ScalingValue = "Scaling"; + private const string UpdatingValue = "Updating"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// + /// Creating + /// Serialized Name: DeploymentProvisioningState.Creating + /// + public static MachineLearningDeploymentProvisioningState Creating { get; } = new MachineLearningDeploymentProvisioningState(CreatingValue); + /// + /// Deleting + /// Serialized Name: DeploymentProvisioningState.Deleting + /// + public static MachineLearningDeploymentProvisioningState Deleting { get; } = new MachineLearningDeploymentProvisioningState(DeletingValue); + /// + /// Scaling + /// Serialized Name: DeploymentProvisioningState.Scaling + /// + public static MachineLearningDeploymentProvisioningState Scaling { get; } = new MachineLearningDeploymentProvisioningState(ScalingValue); + /// + /// Updating + /// Serialized Name: DeploymentProvisioningState.Updating + /// + public static MachineLearningDeploymentProvisioningState Updating { get; } = new MachineLearningDeploymentProvisioningState(UpdatingValue); + /// + /// Succeeded + /// Serialized Name: DeploymentProvisioningState.Succeeded + /// + public static MachineLearningDeploymentProvisioningState Succeeded { get; } = new MachineLearningDeploymentProvisioningState(SucceededValue); + /// + /// Failed + /// Serialized Name: DeploymentProvisioningState.Failed + /// + public static MachineLearningDeploymentProvisioningState Failed { get; } = new MachineLearningDeploymentProvisioningState(FailedValue); + /// + /// Canceled + /// Serialized Name: DeploymentProvisioningState.Canceled + /// + public static MachineLearningDeploymentProvisioningState Canceled { get; } = new MachineLearningDeploymentProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningDeploymentProvisioningState left, MachineLearningDeploymentProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningDeploymentProvisioningState left, MachineLearningDeploymentProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningDeploymentProvisioningState(string value) => new MachineLearningDeploymentProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningDeploymentProvisioningState other && Equals(other); + /// + public bool Equals(MachineLearningDeploymentProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs new file mode 100644 index 000000000000..55df3ce69188 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.Serialization.cs @@ -0,0 +1,108 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDeploymentResourceConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InstanceCount)) + { + writer.WritePropertyName("instanceCount"); + writer.WriteNumberValue(InstanceCount.Value); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningDeploymentResourceConfiguration DeserializeMachineLearningDeploymentResourceConfiguration(JsonElement element) + { + Optional instanceCount = default; + Optional instanceType = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + properties = dictionary; + continue; + } + } + return new MachineLearningDeploymentResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.cs new file mode 100644 index 000000000000..db427a2b5690 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDeploymentResourceConfiguration.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; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningDeploymentResourceConfiguration. + /// Serialized Name: DeploymentResourceConfiguration + /// + public partial class MachineLearningDeploymentResourceConfiguration : MachineLearningResourceConfiguration + { + /// Initializes a new instance of MachineLearningDeploymentResourceConfiguration. + public MachineLearningDeploymentResourceConfiguration() + { + } + + /// Initializes a new instance of MachineLearningDeploymentResourceConfiguration. + /// + /// Optional number of instances or nodes used by the compute target. + /// Serialized Name: ResourceConfiguration.instanceCount + /// + /// + /// Optional type of VM used as supported by the compute target. + /// Serialized Name: ResourceConfiguration.instanceType + /// + /// + /// Additional properties bag. + /// Serialized Name: ResourceConfiguration.properties + /// + internal MachineLearningDeploymentResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties) : base(instanceCount, instanceType, properties) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResult.Serialization.cs new file mode 100644 index 000000000000..204b9eff8be3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDiagnoseResult + { + internal static MachineLearningDiagnoseResult DeserializeMachineLearningDiagnoseResult(JsonElement element) + { + Optional code = default; + Optional level = default; + Optional message = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code")) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("level")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + level = new MachineLearningDiagnoseResultLevel(property.Value.GetString()); + continue; + } + if (property.NameEquals("message")) + { + message = property.Value.GetString(); + continue; + } + } + return new MachineLearningDiagnoseResult(code.Value, Optional.ToNullable(level), message.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResult.cs new file mode 100644 index 000000000000..a9975acb9cbc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResult.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Result of Diagnose + /// Serialized Name: DiagnoseResult + /// + public partial class MachineLearningDiagnoseResult + { + /// Initializes a new instance of MachineLearningDiagnoseResult. + internal MachineLearningDiagnoseResult() + { + } + + /// Initializes a new instance of MachineLearningDiagnoseResult. + /// + /// Code for workspace setup error + /// Serialized Name: DiagnoseResult.code + /// + /// + /// Level of workspace setup error + /// Serialized Name: DiagnoseResult.level + /// + /// + /// Message of workspace setup error + /// Serialized Name: DiagnoseResult.message + /// + internal MachineLearningDiagnoseResult(string code, MachineLearningDiagnoseResultLevel? level, string message) + { + Code = code; + Level = level; + Message = message; + } + + /// + /// Code for workspace setup error + /// Serialized Name: DiagnoseResult.code + /// + public string Code { get; } + /// + /// Level of workspace setup error + /// Serialized Name: DiagnoseResult.level + /// + public MachineLearningDiagnoseResultLevel? Level { get; } + /// + /// Message of workspace setup error + /// Serialized Name: DiagnoseResult.message + /// + public string Message { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultLevel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultLevel.cs new file mode 100644 index 000000000000..fc0f5065deaf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultLevel.cs @@ -0,0 +1,66 @@ +// 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 of workspace setup error + /// Serialized Name: DiagnoseResultLevel + /// + public readonly partial struct MachineLearningDiagnoseResultLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningDiagnoseResultLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WarningValue = "Warning"; + private const string ErrorValue = "Error"; + private const string InformationValue = "Information"; + + /// + /// Warning + /// Serialized Name: DiagnoseResultLevel.Warning + /// + public static MachineLearningDiagnoseResultLevel Warning { get; } = new MachineLearningDiagnoseResultLevel(WarningValue); + /// + /// Error + /// Serialized Name: DiagnoseResultLevel.Error + /// + public static MachineLearningDiagnoseResultLevel Error { get; } = new MachineLearningDiagnoseResultLevel(ErrorValue); + /// + /// Information + /// Serialized Name: DiagnoseResultLevel.Information + /// + public static MachineLearningDiagnoseResultLevel Information { get; } = new MachineLearningDiagnoseResultLevel(InformationValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningDiagnoseResultLevel left, MachineLearningDiagnoseResultLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningDiagnoseResultLevel left, MachineLearningDiagnoseResultLevel right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningDiagnoseResultLevel(string value) => new MachineLearningDiagnoseResultLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningDiagnoseResultLevel other && Equals(other); + /// + public bool Equals(MachineLearningDiagnoseResultLevel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultValue.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultValue.Serialization.cs new file mode 100644 index 000000000000..d05b56284e2a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultValue.Serialization.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDiagnoseResultValue + { + internal static MachineLearningDiagnoseResultValue DeserializeMachineLearningDiagnoseResultValue(JsonElement element) + { + Optional> userDefinedRouteResults = default; + Optional> networkSecurityRuleResults = default; + Optional> resourceLockResults = default; + Optional> dnsResolutionResults = default; + Optional> storageAccountResults = default; + Optional> keyVaultResults = default; + Optional> containerRegistryResults = default; + Optional> applicationInsightsResults = default; + Optional> otherResults = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userDefinedRouteResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + userDefinedRouteResults = array; + continue; + } + if (property.NameEquals("networkSecurityRuleResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + networkSecurityRuleResults = array; + continue; + } + if (property.NameEquals("resourceLockResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + resourceLockResults = array; + continue; + } + if (property.NameEquals("dnsResolutionResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + dnsResolutionResults = array; + continue; + } + if (property.NameEquals("storageAccountResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + storageAccountResults = array; + continue; + } + if (property.NameEquals("keyVaultResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + keyVaultResults = array; + continue; + } + if (property.NameEquals("containerRegistryResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + containerRegistryResults = array; + continue; + } + if (property.NameEquals("applicationInsightsResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + applicationInsightsResults = array; + continue; + } + if (property.NameEquals("otherResults")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningDiagnoseResult.DeserializeMachineLearningDiagnoseResult(item)); + } + otherResults = array; + continue; + } + } + return new MachineLearningDiagnoseResultValue(Optional.ToList(userDefinedRouteResults), Optional.ToList(networkSecurityRuleResults), Optional.ToList(resourceLockResults), Optional.ToList(dnsResolutionResults), Optional.ToList(storageAccountResults), Optional.ToList(keyVaultResults), Optional.ToList(containerRegistryResults), Optional.ToList(applicationInsightsResults), Optional.ToList(otherResults)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultValue.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultValue.cs new file mode 100644 index 000000000000..cb6e7faa62e8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDiagnoseResultValue.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningDiagnoseResultValue. + /// Serialized Name: DiagnoseResponseResultValue + /// + public partial class MachineLearningDiagnoseResultValue + { + /// Initializes a new instance of MachineLearningDiagnoseResultValue. + internal MachineLearningDiagnoseResultValue() + { + UserDefinedRouteResults = new ChangeTrackingList(); + NetworkSecurityRuleResults = new ChangeTrackingList(); + ResourceLockResults = new ChangeTrackingList(); + DnsResolutionResults = new ChangeTrackingList(); + StorageAccountResults = new ChangeTrackingList(); + KeyVaultResults = new ChangeTrackingList(); + ContainerRegistryResults = new ChangeTrackingList(); + ApplicationInsightsResults = new ChangeTrackingList(); + OtherResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningDiagnoseResultValue. + /// Serialized Name: DiagnoseResponseResultValue.userDefinedRouteResults. + /// Serialized Name: DiagnoseResponseResultValue.networkSecurityRuleResults. + /// Serialized Name: DiagnoseResponseResultValue.resourceLockResults. + /// Serialized Name: DiagnoseResponseResultValue.dnsResolutionResults. + /// Serialized Name: DiagnoseResponseResultValue.storageAccountResults. + /// Serialized Name: DiagnoseResponseResultValue.keyVaultResults. + /// Serialized Name: DiagnoseResponseResultValue.containerRegistryResults. + /// Serialized Name: DiagnoseResponseResultValue.applicationInsightsResults. + /// Serialized Name: DiagnoseResponseResultValue.otherResults. + internal MachineLearningDiagnoseResultValue(IReadOnlyList userDefinedRouteResults, IReadOnlyList networkSecurityRuleResults, IReadOnlyList resourceLockResults, IReadOnlyList dnsResolutionResults, IReadOnlyList storageAccountResults, IReadOnlyList keyVaultResults, IReadOnlyList containerRegistryResults, IReadOnlyList applicationInsightsResults, IReadOnlyList otherResults) + { + UserDefinedRouteResults = userDefinedRouteResults; + NetworkSecurityRuleResults = networkSecurityRuleResults; + ResourceLockResults = resourceLockResults; + DnsResolutionResults = dnsResolutionResults; + StorageAccountResults = storageAccountResults; + KeyVaultResults = keyVaultResults; + ContainerRegistryResults = containerRegistryResults; + ApplicationInsightsResults = applicationInsightsResults; + OtherResults = otherResults; + } + + /// Serialized Name: DiagnoseResponseResultValue.userDefinedRouteResults. + public IReadOnlyList UserDefinedRouteResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.networkSecurityRuleResults. + public IReadOnlyList NetworkSecurityRuleResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.resourceLockResults. + public IReadOnlyList ResourceLockResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.dnsResolutionResults. + public IReadOnlyList DnsResolutionResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.storageAccountResults. + public IReadOnlyList StorageAccountResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.keyVaultResults. + public IReadOnlyList KeyVaultResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.containerRegistryResults. + public IReadOnlyList ContainerRegistryResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.applicationInsightsResults. + public IReadOnlyList ApplicationInsightsResults { get; } + /// Serialized Name: DiagnoseResponseResultValue.otherResults. + public IReadOnlyList OtherResults { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs new file mode 100644 index 000000000000..28430e3c3f81 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningDistributionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("distributionType"); + writer.WriteStringValue(DistributionType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningDistributionConfiguration DeserializeMachineLearningDistributionConfiguration(JsonElement element) + { + if (element.TryGetProperty("distributionType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Mpi": return MpiDistributionConfiguration.DeserializeMpiDistributionConfiguration(element); + case "PyTorch": return PyTorchDistributionConfiguration.DeserializePyTorchDistributionConfiguration(element); + case "TensorFlow": return TensorFlowDistributionConfiguration.DeserializeTensorFlowDistributionConfiguration(element); + } + } + return UnknownDistributionConfiguration.DeserializeUnknownDistributionConfiguration(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs new file mode 100644 index 000000000000..059c03684c21 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningDistributionConfiguration.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Base definition for job distribution configuration. + /// Serialized Name: DistributionConfiguration + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningDistributionConfiguration + { + /// Initializes a new instance of MachineLearningDistributionConfiguration. + protected MachineLearningDistributionConfiguration() + { + } + + /// Initializes a new instance of MachineLearningDistributionConfiguration. + /// + /// [Required] Specifies the type of distribution framework. + /// Serialized Name: DistributionConfiguration.distributionType + /// + internal MachineLearningDistributionConfiguration(DistributionType distributionType) + { + DistributionType = distributionType; + } + + /// + /// [Required] Specifies the type of distribution framework. + /// Serialized Name: DistributionConfiguration.distributionType + /// + internal DistributionType DistributionType { get; set; } + } +} 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 new file mode 100644 index 000000000000..9cbb14e7f592 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEarlyTerminationPolicy : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DelayEvaluation)) + { + writer.WritePropertyName("delayEvaluation"); + writer.WriteNumberValue(DelayEvaluation.Value); + } + if (Optional.IsDefined(EvaluationInterval)) + { + writer.WritePropertyName("evaluationInterval"); + writer.WriteNumberValue(EvaluationInterval.Value); + } + writer.WritePropertyName("policyType"); + writer.WriteStringValue(PolicyType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningEarlyTerminationPolicy DeserializeMachineLearningEarlyTerminationPolicy(JsonElement element) + { + if (element.TryGetProperty("policyType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Bandit": return BanditPolicy.DeserializeBanditPolicy(element); + case "MedianStopping": return MedianStoppingPolicy.DeserializeMedianStoppingPolicy(element); + case "TruncationSelection": return TruncationSelectionPolicy.DeserializeTruncationSelectionPolicy(element); + } + } + return UnknownEarlyTerminationPolicy.DeserializeUnknownEarlyTerminationPolicy(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs new file mode 100644 index 000000000000..603082454fd0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEarlyTerminationPolicy.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Early termination policies enable canceling poor-performing runs before they complete + /// Serialized Name: EarlyTerminationPolicy + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningEarlyTerminationPolicy + { + /// Initializes a new instance of MachineLearningEarlyTerminationPolicy. + protected MachineLearningEarlyTerminationPolicy() + { + } + + /// Initializes a new instance of MachineLearningEarlyTerminationPolicy. + /// + /// Number of intervals by which to delay the first evaluation. + /// Serialized Name: EarlyTerminationPolicy.delayEvaluation + /// + /// + /// Interval (number of runs) between policy evaluations. + /// Serialized Name: EarlyTerminationPolicy.evaluationInterval + /// + /// + /// [Required] Name of policy configuration + /// Serialized Name: EarlyTerminationPolicy.policyType + /// + internal MachineLearningEarlyTerminationPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType) + { + DelayEvaluation = delayEvaluation; + EvaluationInterval = evaluationInterval; + PolicyType = policyType; + } + + /// + /// Number of intervals by which to delay the first evaluation. + /// Serialized Name: EarlyTerminationPolicy.delayEvaluation + /// + public int? DelayEvaluation { get; set; } + /// + /// Interval (number of runs) between policy evaluations. + /// Serialized Name: EarlyTerminationPolicy.evaluationInterval + /// + public int? EvaluationInterval { get; set; } + /// + /// [Required] Name of policy configuration + /// Serialized Name: EarlyTerminationPolicy.policyType + /// + internal EarlyTerminationPolicyType PolicyType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEgressPublicNetworkAccessType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEgressPublicNetworkAccessType.cs new file mode 100644 index 000000000000..d062eb259dd3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEgressPublicNetworkAccessType.cs @@ -0,0 +1,60 @@ +// 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 whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. + /// Serialized Name: EgressPublicNetworkAccessType + /// + public readonly partial struct MachineLearningEgressPublicNetworkAccessType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningEgressPublicNetworkAccessType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// + /// Enabled + /// Serialized Name: EgressPublicNetworkAccessType.Enabled + /// + public static MachineLearningEgressPublicNetworkAccessType Enabled { get; } = new MachineLearningEgressPublicNetworkAccessType(EnabledValue); + /// + /// Disabled + /// Serialized Name: EgressPublicNetworkAccessType.Disabled + /// + public static MachineLearningEgressPublicNetworkAccessType Disabled { get; } = new MachineLearningEgressPublicNetworkAccessType(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningEgressPublicNetworkAccessType left, MachineLearningEgressPublicNetworkAccessType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningEgressPublicNetworkAccessType left, MachineLearningEgressPublicNetworkAccessType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningEgressPublicNetworkAccessType(string value) => new MachineLearningEgressPublicNetworkAccessType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningEgressPublicNetworkAccessType other && Equals(other); + /// + public bool Equals(MachineLearningEgressPublicNetworkAccessType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..969d0cc04abf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEncryptionKeyVaultProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyVaultArmId"); + writer.WriteStringValue(KeyVaultArmId); + writer.WritePropertyName("keyIdentifier"); + writer.WriteStringValue(KeyIdentifier); + if (Optional.IsDefined(IdentityClientId)) + { + writer.WritePropertyName("identityClientId"); + writer.WriteStringValue(IdentityClientId); + } + writer.WriteEndObject(); + } + + internal static MachineLearningEncryptionKeyVaultProperties DeserializeMachineLearningEncryptionKeyVaultProperties(JsonElement element) + { + ResourceIdentifier keyVaultArmId = default; + string keyIdentifier = default; + Optional identityClientId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyVaultArmId")) + { + keyVaultArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("keyIdentifier")) + { + keyIdentifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("identityClientId")) + { + identityClientId = property.Value.GetString(); + continue; + } + } + return new MachineLearningEncryptionKeyVaultProperties(keyVaultArmId, keyIdentifier, identityClientId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs new file mode 100644 index 000000000000..e7a26528f8fd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionKeyVaultProperties.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningEncryptionKeyVaultProperties. + /// Serialized Name: EncryptionKeyVaultProperties + /// + public partial class MachineLearningEncryptionKeyVaultProperties + { + /// Initializes a new instance of MachineLearningEncryptionKeyVaultProperties. + /// + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Serialized Name: EncryptionKeyVaultProperties.keyVaultArmId + /// + /// + /// Key vault uri to access the encryption key. + /// Serialized Name: EncryptionKeyVaultProperties.keyIdentifier + /// + /// or is null. + 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. + /// Serialized Name: EncryptionKeyVaultProperties.keyVaultArmId + /// + /// + /// Key vault uri to access the encryption key. + /// Serialized Name: EncryptionKeyVaultProperties.keyIdentifier + /// + /// + /// For future use - The client id of the identity which will be used to access key vault. + /// Serialized Name: EncryptionKeyVaultProperties.identityClientId + /// + internal MachineLearningEncryptionKeyVaultProperties(ResourceIdentifier keyVaultArmId, string keyIdentifier, string identityClientId) + { + KeyVaultArmId = keyVaultArmId; + KeyIdentifier = keyIdentifier; + IdentityClientId = identityClientId; + } + + /// + /// The ArmId of the keyVault where the customer owned encryption key is present. + /// Serialized Name: EncryptionKeyVaultProperties.keyVaultArmId + /// + public ResourceIdentifier KeyVaultArmId { get; set; } + /// + /// Key vault uri to access the encryption key. + /// Serialized Name: EncryptionKeyVaultProperties.keyIdentifier + /// + public string KeyIdentifier { get; set; } + /// + /// For future use - The client id of the identity which will be used to access key vault. + /// Serialized Name: EncryptionKeyVaultProperties.identityClientId + /// + 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 new file mode 100644 index 000000000000..3730db95ebbb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEncryptionSetting : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.ToString()); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + writer.WritePropertyName("keyVaultProperties"); + writer.WriteObjectValue(KeyVaultProperties); + writer.WriteEndObject(); + } + + internal static MachineLearningEncryptionSetting DeserializeMachineLearningEncryptionSetting(JsonElement element) + { + MachineLearningEncryptionStatus status = default; + Optional identity = default; + MachineLearningEncryptionKeyVaultProperties keyVaultProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + status = new MachineLearningEncryptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + identity = MachineLearningCmkIdentity.DeserializeMachineLearningCmkIdentity(property.Value); + continue; + } + if (property.NameEquals("keyVaultProperties")) + { + keyVaultProperties = MachineLearningEncryptionKeyVaultProperties.DeserializeMachineLearningEncryptionKeyVaultProperties(property.Value); + continue; + } + } + return new MachineLearningEncryptionSetting(status, identity.Value, keyVaultProperties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs new file mode 100644 index 000000000000..2c2557c7e887 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionSetting.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningEncryptionSetting. + /// Serialized Name: EncryptionProperty + /// + public partial class MachineLearningEncryptionSetting + { + /// Initializes a new instance of MachineLearningEncryptionSetting. + /// + /// Indicates whether or not the encryption is enabled for the workspace. + /// Serialized Name: EncryptionProperty.status + /// + /// + /// Customer Key vault properties. + /// Serialized Name: EncryptionProperty.keyVaultProperties + /// + /// is null. + public MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningEncryptionKeyVaultProperties keyVaultProperties) + { + Argument.AssertNotNull(keyVaultProperties, nameof(keyVaultProperties)); + + Status = status; + KeyVaultProperties = keyVaultProperties; + } + + /// Initializes a new instance of MachineLearningEncryptionSetting. + /// + /// Indicates whether or not the encryption is enabled for the workspace. + /// Serialized Name: EncryptionProperty.status + /// + /// + /// The identity that will be used to access the key vault for encryption at rest. + /// Serialized Name: EncryptionProperty.identity + /// + /// + /// Customer Key vault properties. + /// Serialized Name: EncryptionProperty.keyVaultProperties + /// + internal MachineLearningEncryptionSetting(MachineLearningEncryptionStatus status, MachineLearningCmkIdentity identity, MachineLearningEncryptionKeyVaultProperties keyVaultProperties) + { + Status = status; + Identity = identity; + KeyVaultProperties = keyVaultProperties; + } + + /// + /// Indicates whether or not the encryption is enabled for the workspace. + /// Serialized Name: EncryptionProperty.status + /// + public MachineLearningEncryptionStatus Status { get; set; } + /// + /// The identity that will be used to access the key vault for encryption at rest. + /// Serialized Name: EncryptionProperty.identity + /// + internal MachineLearningCmkIdentity Identity { get; set; } + /// + /// The ArmId of the user assigned identity that will be used to access the customer managed key vault + /// Serialized Name: IdentityForCmk.userAssignedIdentity + /// + public ResourceIdentifier UserAssignedIdentity + { + get => Identity is null ? default : Identity.UserAssignedIdentity; + set + { + if (Identity is null) + Identity = new MachineLearningCmkIdentity(); + Identity.UserAssignedIdentity = value; + } + } + + /// + /// Customer Key vault properties. + /// Serialized Name: EncryptionProperty.keyVaultProperties + /// + public MachineLearningEncryptionKeyVaultProperties KeyVaultProperties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionStatus.cs new file mode 100644 index 000000000000..9a0eb93a9961 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEncryptionStatus.cs @@ -0,0 +1,60 @@ +// 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 or not the encryption is enabled for the workspace. + /// Serialized Name: EncryptionStatus + /// + public readonly partial struct MachineLearningEncryptionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningEncryptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// + /// Enabled + /// Serialized Name: EncryptionStatus.Enabled + /// + public static MachineLearningEncryptionStatus Enabled { get; } = new MachineLearningEncryptionStatus(EnabledValue); + /// + /// Disabled + /// Serialized Name: EncryptionStatus.Disabled + /// + public static MachineLearningEncryptionStatus Disabled { get; } = new MachineLearningEncryptionStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningEncryptionStatus left, MachineLearningEncryptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningEncryptionStatus left, MachineLearningEncryptionStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningEncryptionStatus(string value) => new MachineLearningEncryptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningEncryptionStatus other && Equals(other); + /// + public bool Equals(MachineLearningEncryptionStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthKeys.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthKeys.Serialization.cs new file mode 100644 index 000000000000..aa7ce5583f67 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthKeys.Serialization.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEndpointAuthKeys : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(PrimaryKey)) + { + if (PrimaryKey != null) + { + writer.WritePropertyName("primaryKey"); + writer.WriteStringValue(PrimaryKey); + } + else + { + writer.WriteNull("primaryKey"); + } + } + if (Optional.IsDefined(SecondaryKey)) + { + if (SecondaryKey != null) + { + writer.WritePropertyName("secondaryKey"); + writer.WriteStringValue(SecondaryKey); + } + else + { + writer.WriteNull("secondaryKey"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningEndpointAuthKeys DeserializeMachineLearningEndpointAuthKeys(JsonElement element) + { + Optional primaryKey = default; + Optional secondaryKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("primaryKey")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + primaryKey = null; + continue; + } + primaryKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryKey")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + secondaryKey = null; + continue; + } + secondaryKey = property.Value.GetString(); + continue; + } + } + return new MachineLearningEndpointAuthKeys(primaryKey.Value, secondaryKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthKeys.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthKeys.cs new file mode 100644 index 000000000000..1ffd6eafa05a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthKeys.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Keys for endpoint authentication. + /// Serialized Name: EndpointAuthKeys + /// + public partial class MachineLearningEndpointAuthKeys + { + /// Initializes a new instance of MachineLearningEndpointAuthKeys. + public MachineLearningEndpointAuthKeys() + { + } + + /// Initializes a new instance of MachineLearningEndpointAuthKeys. + /// + /// The primary key. + /// Serialized Name: EndpointAuthKeys.primaryKey + /// + /// + /// The secondary key. + /// Serialized Name: EndpointAuthKeys.secondaryKey + /// + internal MachineLearningEndpointAuthKeys(string primaryKey, string secondaryKey) + { + PrimaryKey = primaryKey; + SecondaryKey = secondaryKey; + } + + /// + /// The primary key. + /// Serialized Name: EndpointAuthKeys.primaryKey + /// + public string PrimaryKey { get; set; } + /// + /// The secondary key. + /// Serialized Name: EndpointAuthKeys.secondaryKey + /// + public string SecondaryKey { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthMode.cs new file mode 100644 index 000000000000..3e2380c35bf5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthMode.cs @@ -0,0 +1,66 @@ +// 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 endpoint authentication mode. + /// Serialized Name: EndpointAuthMode + /// + public readonly partial struct MachineLearningEndpointAuthMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningEndpointAuthMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AMLTokenValue = "AMLToken"; + private const string KeyValue = "Key"; + private const string AADTokenValue = "AADToken"; + + /// + /// AMLToken + /// Serialized Name: EndpointAuthMode.AMLToken + /// + public static MachineLearningEndpointAuthMode AMLToken { get; } = new MachineLearningEndpointAuthMode(AMLTokenValue); + /// + /// Key + /// Serialized Name: EndpointAuthMode.Key + /// + public static MachineLearningEndpointAuthMode Key { get; } = new MachineLearningEndpointAuthMode(KeyValue); + /// + /// AADToken + /// Serialized Name: EndpointAuthMode.AADToken + /// + public static MachineLearningEndpointAuthMode AADToken { get; } = new MachineLearningEndpointAuthMode(AADTokenValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningEndpointAuthMode left, MachineLearningEndpointAuthMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningEndpointAuthMode left, MachineLearningEndpointAuthMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningEndpointAuthMode(string value) => new MachineLearningEndpointAuthMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningEndpointAuthMode other && Equals(other); + /// + public bool Equals(MachineLearningEndpointAuthMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..4b53e3fc2219 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEndpointAuthToken + { + internal static MachineLearningEndpointAuthToken DeserializeMachineLearningEndpointAuthToken(JsonElement element) + { + Optional accessToken = default; + Optional expiryTimeUtc = default; + Optional refreshAfterTimeUtc = default; + Optional tokenType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("accessToken")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + accessToken = null; + continue; + } + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiryTimeUtc")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + expiryTimeUtc = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("refreshAfterTimeUtc")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + refreshAfterTimeUtc = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("tokenType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tokenType = null; + continue; + } + tokenType = property.Value.GetString(); + continue; + } + } + return new MachineLearningEndpointAuthToken(accessToken.Value, Optional.ToNullable(expiryTimeUtc), Optional.ToNullable(refreshAfterTimeUtc), tokenType.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs new file mode 100644 index 000000000000..45aab19d2e06 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointAuthToken.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Service Token + /// Serialized Name: EndpointAuthToken + /// + public partial class MachineLearningEndpointAuthToken + { + /// Initializes a new instance of MachineLearningEndpointAuthToken. + internal MachineLearningEndpointAuthToken() + { + } + + /// Initializes a new instance of MachineLearningEndpointAuthToken. + /// + /// Access token for endpoint authentication. + /// Serialized Name: EndpointAuthToken.accessToken + /// + /// + /// Access token expiry time (UTC). + /// Serialized Name: EndpointAuthToken.expiryTimeUtc + /// + /// + /// Refresh access token after time (UTC). + /// Serialized Name: EndpointAuthToken.refreshAfterTimeUtc + /// + /// + /// Access token type. + /// Serialized Name: EndpointAuthToken.tokenType + /// + internal MachineLearningEndpointAuthToken(string accessToken, long? expiryTimeUtc, long? refreshAfterTimeUtc, string tokenType) + { + AccessToken = accessToken; + ExpiryTimeUtc = expiryTimeUtc; + RefreshAfterTimeUtc = refreshAfterTimeUtc; + TokenType = tokenType; + } + + /// + /// Access token for endpoint authentication. + /// Serialized Name: EndpointAuthToken.accessToken + /// + public string AccessToken { get; } + /// + /// Access token expiry time (UTC). + /// Serialized Name: EndpointAuthToken.expiryTimeUtc + /// + public long? ExpiryTimeUtc { get; } + /// + /// Refresh access token after time (UTC). + /// Serialized Name: EndpointAuthToken.refreshAfterTimeUtc + /// + public long? RefreshAfterTimeUtc { get; } + /// + /// Access token type. + /// Serialized Name: EndpointAuthToken.tokenType + /// + public string TokenType { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointComputeType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointComputeType.cs new file mode 100644 index 000000000000..fd97ceeb20ab --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointComputeType.cs @@ -0,0 +1,66 @@ +// 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 endpoint compute type. + /// Serialized Name: EndpointComputeType + /// + public readonly partial struct MachineLearningEndpointComputeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningEndpointComputeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ManagedValue = "Managed"; + private const string KubernetesValue = "Kubernetes"; + private const string AzureMLComputeValue = "AzureMLCompute"; + + /// + /// Managed + /// Serialized Name: EndpointComputeType.Managed + /// + public static MachineLearningEndpointComputeType Managed { get; } = new MachineLearningEndpointComputeType(ManagedValue); + /// + /// Kubernetes + /// Serialized Name: EndpointComputeType.Kubernetes + /// + public static MachineLearningEndpointComputeType Kubernetes { get; } = new MachineLearningEndpointComputeType(KubernetesValue); + /// + /// AzureMLCompute + /// Serialized Name: EndpointComputeType.AzureMLCompute + /// + public static MachineLearningEndpointComputeType AzureMLCompute { get; } = new MachineLearningEndpointComputeType(AzureMLComputeValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningEndpointComputeType left, MachineLearningEndpointComputeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningEndpointComputeType left, MachineLearningEndpointComputeType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningEndpointComputeType(string value) => new MachineLearningEndpointComputeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningEndpointComputeType other && Equals(other); + /// + public bool Equals(MachineLearningEndpointComputeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..cee689f7730e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.Serialization.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEndpointDeploymentProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(EnvironmentId)) + { + if (EnvironmentId != null) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + else + { + writer.WriteNull("environmentId"); + } + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningEndpointDeploymentProperties DeserializeMachineLearningEndpointDeploymentProperties(JsonElement element) + { + Optional codeConfiguration = default; + Optional description = default; + Optional environmentId = default; + Optional> environmentVariables = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("codeConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentId = null; + continue; + } + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = 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, property0.Value.GetString()); + } + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + } + return new MachineLearningEndpointDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs new file mode 100644 index 000000000000..f97f2469dc59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointDeploymentProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Base definition for endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase + /// + public partial class MachineLearningEndpointDeploymentProperties + { + /// Initializes a new instance of MachineLearningEndpointDeploymentProperties. + public MachineLearningEndpointDeploymentProperties() + { + EnvironmentVariables = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningEndpointDeploymentProperties. + /// + /// Code configuration for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.codeConfiguration + /// + /// + /// Description of the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.description + /// + /// + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentId + /// + /// + /// Environment variables configuration for the deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentVariables + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointDeploymentPropertiesBase.properties + /// + internal MachineLearningEndpointDeploymentProperties(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties) + { + CodeConfiguration = codeConfiguration; + Description = description; + EnvironmentId = environmentId; + EnvironmentVariables = environmentVariables; + Properties = properties; + } + + /// + /// Code configuration for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.codeConfiguration + /// + public MachineLearningCodeConfiguration CodeConfiguration { get; set; } + /// + /// Description of the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.description + /// + public string Description { get; set; } + /// + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentId + /// + public string EnvironmentId { get; set; } + /// + /// Environment variables configuration for the deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentVariables + /// + public IDictionary EnvironmentVariables { get; set; } + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointDeploymentPropertiesBase.properties + /// + public IDictionary Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointKeyRegenerateContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointKeyRegenerateContent.Serialization.cs new file mode 100644 index 000000000000..1c614428d3c8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointKeyRegenerateContent.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEndpointKeyRegenerateContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("keyType"); + writer.WriteStringValue(KeyType.ToString()); + if (Optional.IsDefined(KeyValue)) + { + if (KeyValue != null) + { + writer.WritePropertyName("keyValue"); + writer.WriteStringValue(KeyValue); + } + else + { + writer.WriteNull("keyValue"); + } + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointKeyRegenerateContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointKeyRegenerateContent.cs new file mode 100644 index 000000000000..cb0890a64fd9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointKeyRegenerateContent.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningEndpointKeyRegenerateContent. + /// Serialized Name: RegenerateEndpointKeysRequest + /// + public partial class MachineLearningEndpointKeyRegenerateContent + { + /// Initializes a new instance of MachineLearningEndpointKeyRegenerateContent. + /// + /// [Required] Specification for which type of key to generate. Primary or Secondary. + /// Serialized Name: RegenerateEndpointKeysRequest.keyType + /// + public MachineLearningEndpointKeyRegenerateContent(MachineLearningKeyType keyType) + { + KeyType = keyType; + } + + /// + /// [Required] Specification for which type of key to generate. Primary or Secondary. + /// Serialized Name: RegenerateEndpointKeysRequest.keyType + /// + public MachineLearningKeyType KeyType { get; } + /// + /// The value the key is set to. + /// Serialized Name: RegenerateEndpointKeysRequest.keyValue + /// + public string KeyValue { 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 new file mode 100644 index 000000000000..47c243b58128 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.Serialization.cs @@ -0,0 +1,148 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEndpointProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("authMode"); + writer.WriteStringValue(AuthMode.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Keys)) + { + if (Keys != null) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + else + { + writer.WriteNull("keys"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningEndpointProperties DeserializeMachineLearningEndpointProperties(JsonElement element) + { + MachineLearningEndpointAuthMode authMode = default; + Optional description = default; + Optional keys = default; + Optional> properties = default; + Optional scoringUri = default; + Optional swaggerUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authMode")) + { + authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("keys")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + keys = null; + continue; + } + keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("scoringUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scoringUri = null; + continue; + } + scoringUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("swaggerUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + swaggerUri = null; + continue; + } + swaggerUri = new Uri(property.Value.GetString()); + continue; + } + } + return new MachineLearningEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs new file mode 100644 index 000000000000..e089ec0c8f33 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProperties.cs @@ -0,0 +1,99 @@ +// 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 +{ + /// + /// Inference Endpoint base definition + /// Serialized Name: EndpointPropertiesBase + /// + public partial class MachineLearningEndpointProperties + { + /// Initializes a new instance of MachineLearningEndpointProperties. + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + public MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode) + { + AuthMode = authMode; + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningEndpointProperties. + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + /// + /// Description of the inference endpoint. + /// Serialized Name: EndpointPropertiesBase.description + /// + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// Serialized Name: EndpointPropertiesBase.keys + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointPropertiesBase.properties + /// + /// + /// Endpoint URI. + /// Serialized Name: EndpointPropertiesBase.scoringUri + /// + /// + /// Endpoint Swagger URI. + /// Serialized Name: EndpointPropertiesBase.swaggerUri + /// + internal MachineLearningEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri) + { + AuthMode = authMode; + Description = description; + Keys = keys; + Properties = properties; + ScoringUri = scoringUri; + SwaggerUri = swaggerUri; + } + + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + public MachineLearningEndpointAuthMode AuthMode { get; set; } + /// + /// Description of the inference endpoint. + /// Serialized Name: EndpointPropertiesBase.description + /// + 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. + /// Serialized Name: EndpointPropertiesBase.keys + /// + public MachineLearningEndpointAuthKeys Keys { get; set; } + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointPropertiesBase.properties + /// + public IDictionary Properties { get; set; } + /// + /// Endpoint URI. + /// Serialized Name: EndpointPropertiesBase.scoringUri + /// + public Uri ScoringUri { get; } + /// + /// Endpoint Swagger URI. + /// Serialized Name: EndpointPropertiesBase.swaggerUri + /// + public Uri SwaggerUri { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProvisioningState.cs new file mode 100644 index 000000000000..9943a1839c80 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointProvisioningState.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// State of endpoint provisioning. + /// Serialized Name: EndpointProvisioningState + /// + public readonly partial struct MachineLearningEndpointProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningEndpointProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string UpdatingValue = "Updating"; + private const string CanceledValue = "Canceled"; + + /// + /// Creating + /// Serialized Name: EndpointProvisioningState.Creating + /// + public static MachineLearningEndpointProvisioningState Creating { get; } = new MachineLearningEndpointProvisioningState(CreatingValue); + /// + /// Deleting + /// Serialized Name: EndpointProvisioningState.Deleting + /// + public static MachineLearningEndpointProvisioningState Deleting { get; } = new MachineLearningEndpointProvisioningState(DeletingValue); + /// + /// Succeeded + /// Serialized Name: EndpointProvisioningState.Succeeded + /// + public static MachineLearningEndpointProvisioningState Succeeded { get; } = new MachineLearningEndpointProvisioningState(SucceededValue); + /// + /// Failed + /// Serialized Name: EndpointProvisioningState.Failed + /// + public static MachineLearningEndpointProvisioningState Failed { get; } = new MachineLearningEndpointProvisioningState(FailedValue); + /// + /// Updating + /// Serialized Name: EndpointProvisioningState.Updating + /// + public static MachineLearningEndpointProvisioningState Updating { get; } = new MachineLearningEndpointProvisioningState(UpdatingValue); + /// + /// Canceled + /// Serialized Name: EndpointProvisioningState.Canceled + /// + public static MachineLearningEndpointProvisioningState Canceled { get; } = new MachineLearningEndpointProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningEndpointProvisioningState left, MachineLearningEndpointProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningEndpointProvisioningState left, MachineLearningEndpointProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningEndpointProvisioningState(string value) => new MachineLearningEndpointProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningEndpointProvisioningState other && Equals(other); + /// + public bool Equals(MachineLearningEndpointProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointScheduleAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointScheduleAction.Serialization.cs new file mode 100644 index 000000000000..755dcfc79181 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointScheduleAction.Serialization.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEndpointScheduleAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("endpointInvocationDefinition"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(EndpointInvocationDefinition); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(EndpointInvocationDefinition.ToString()).RootElement); +#endif + writer.WritePropertyName("actionType"); + writer.WriteStringValue(ActionType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningEndpointScheduleAction DeserializeMachineLearningEndpointScheduleAction(JsonElement element) + { + BinaryData endpointInvocationDefinition = default; + ScheduleActionType actionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointInvocationDefinition")) + { + endpointInvocationDefinition = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("actionType")) + { + actionType = new ScheduleActionType(property.Value.GetString()); + continue; + } + } + return new MachineLearningEndpointScheduleAction(actionType, endpointInvocationDefinition); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointScheduleAction.cs new file mode 100644 index 000000000000..48e373915477 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEndpointScheduleAction.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningEndpointScheduleAction. + /// Serialized Name: EndpointScheduleAction + /// + public partial class MachineLearningEndpointScheduleAction : MachineLearningScheduleAction + { + /// Initializes a new instance of MachineLearningEndpointScheduleAction. + /// + /// [Required] Defines Schedule action definition details. + /// <see href="TBD" /> + /// Serialized Name: EndpointScheduleAction.endpointInvocationDefinition + /// + /// is null. + public MachineLearningEndpointScheduleAction(BinaryData endpointInvocationDefinition) + { + Argument.AssertNotNull(endpointInvocationDefinition, nameof(endpointInvocationDefinition)); + + EndpointInvocationDefinition = endpointInvocationDefinition; + ActionType = ScheduleActionType.InvokeBatchEndpoint; + } + + /// Initializes a new instance of MachineLearningEndpointScheduleAction. + /// + /// [Required] Specifies the action type of the schedule + /// Serialized Name: ScheduleActionBase.actionType + /// + /// + /// [Required] Defines Schedule action definition details. + /// <see href="TBD" /> + /// Serialized Name: EndpointScheduleAction.endpointInvocationDefinition + /// + internal MachineLearningEndpointScheduleAction(ScheduleActionType actionType, BinaryData endpointInvocationDefinition) : base(actionType) + { + EndpointInvocationDefinition = endpointInvocationDefinition; + ActionType = actionType; + } + + /// + /// [Required] Defines Schedule action definition details. + /// <see href="TBD" /> + /// Serialized Name: EndpointScheduleAction.endpointInvocationDefinition + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated 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 EndpointInvocationDefinition { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerData.Serialization.cs new file mode 100644 index 000000000000..5cd19cff407f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningEnvironmentContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningEnvironmentContainerData DeserializeMachineLearningEnvironmentContainerData(JsonElement element) + { + MachineLearningEnvironmentContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningEnvironmentContainerProperties.DeserializeMachineLearningEnvironmentContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningEnvironmentContainerData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..327932663d98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEnvironmentContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningEnvironmentContainerProperties DeserializeMachineLearningEnvironmentContainerProperties(JsonElement element) + { + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningEnvironmentContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs new file mode 100644 index 000000000000..dd8835c7c653 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentContainerProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Container for environment specification versions. + /// Serialized Name: EnvironmentContainer + /// + public partial class MachineLearningEnvironmentContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningEnvironmentContainerProperties. + public MachineLearningEnvironmentContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningEnvironmentContainerProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + internal MachineLearningEnvironmentContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentType.cs new file mode 100644 index 000000000000..fdedccb3a702 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Environment type is either user created or curated by Azure ML service + /// Serialized Name: EnvironmentType + /// + public readonly partial struct MachineLearningEnvironmentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningEnvironmentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CuratedValue = "Curated"; + private const string UserCreatedValue = "UserCreated"; + + /// + /// Curated + /// Serialized Name: EnvironmentType.Curated + /// + public static MachineLearningEnvironmentType Curated { get; } = new MachineLearningEnvironmentType(CuratedValue); + /// + /// UserCreated + /// Serialized Name: EnvironmentType.UserCreated + /// + public static MachineLearningEnvironmentType UserCreated { get; } = new MachineLearningEnvironmentType(UserCreatedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningEnvironmentType left, MachineLearningEnvironmentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningEnvironmentType left, MachineLearningEnvironmentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningEnvironmentType(string value) => new MachineLearningEnvironmentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningEnvironmentType other && Equals(other); + /// + public bool Equals(MachineLearningEnvironmentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionData.Serialization.cs new file mode 100644 index 000000000000..5f973e3474f3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningEnvironmentVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningEnvironmentVersionData DeserializeMachineLearningEnvironmentVersionData(JsonElement element) + { + MachineLearningEnvironmentVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningEnvironmentVersionProperties.DeserializeMachineLearningEnvironmentVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningEnvironmentVersionData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..2823e64e075a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.Serialization.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEnvironmentVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AutoRebuild)) + { + writer.WritePropertyName("autoRebuild"); + writer.WriteStringValue(AutoRebuild.Value.ToString()); + } + if (Optional.IsDefined(Build)) + { + writer.WritePropertyName("build"); + writer.WriteObjectValue(Build); + } + if (Optional.IsDefined(CondaFile)) + { + writer.WritePropertyName("condaFile"); + writer.WriteStringValue(CondaFile); + } + if (Optional.IsDefined(Image)) + { + writer.WritePropertyName("image"); + writer.WriteStringValue(Image); + } + if (Optional.IsDefined(InferenceConfig)) + { + writer.WritePropertyName("inferenceConfig"); + writer.WriteObjectValue(InferenceConfig); + } + if (Optional.IsDefined(OSType)) + { + writer.WritePropertyName("osType"); + writer.WriteStringValue(OSType.Value.ToString()); + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningEnvironmentVersionProperties DeserializeMachineLearningEnvironmentVersionProperties(JsonElement element) + { + Optional autoRebuild = default; + Optional build = default; + Optional condaFile = default; + Optional environmentType = default; + Optional image = default; + Optional inferenceConfig = default; + Optional osType = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoRebuild")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoRebuild = new AutoRebuildSetting(property.Value.GetString()); + continue; + } + if (property.NameEquals("build")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + build = MachineLearningBuildContext.DeserializeMachineLearningBuildContext(property.Value); + continue; + } + if (property.NameEquals("condaFile")) + { + condaFile = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + environmentType = new MachineLearningEnvironmentType(property.Value.GetString()); + continue; + } + if (property.NameEquals("image")) + { + image = property.Value.GetString(); + continue; + } + if (property.NameEquals("inferenceConfig")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + inferenceConfig = MachineLearningInferenceContainerProperties.DeserializeMachineLearningInferenceContainerProperties(property.Value); + continue; + } + if (property.NameEquals("osType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + osType = new MachineLearningOperatingSystemType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningEnvironmentVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToNullable(autoRebuild), build.Value, condaFile.Value, Optional.ToNullable(environmentType), image.Value, inferenceConfig.Value, Optional.ToNullable(osType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs new file mode 100644 index 000000000000..12685dfaa959 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEnvironmentVersionProperties.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Environment version details. + /// Serialized Name: EnvironmentVersion + /// + public partial class MachineLearningEnvironmentVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningEnvironmentVersionProperties. + public MachineLearningEnvironmentVersionProperties() + { + } + + /// Initializes a new instance of MachineLearningEnvironmentVersionProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// Defines if image needs to be rebuilt based on base image changes. + /// Serialized Name: EnvironmentVersion.autoRebuild + /// + /// + /// Configuration settings for Docker build context. + /// Serialized Name: EnvironmentVersion.build + /// + /// + /// 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" /> + /// Serialized Name: EnvironmentVersion.condaFile + /// + /// + /// 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" /> + /// Serialized Name: EnvironmentVersion.environmentType + /// + /// + /// 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" /> + /// Serialized Name: EnvironmentVersion.image + /// + /// + /// Defines configuration specific to inference. + /// Serialized Name: EnvironmentVersion.inferenceConfig + /// + /// + /// The OS type of the environment. + /// Serialized Name: EnvironmentVersion.osType + /// + internal MachineLearningEnvironmentVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, AutoRebuildSetting? autoRebuild, MachineLearningBuildContext build, string condaFile, MachineLearningEnvironmentType? environmentType, string image, MachineLearningInferenceContainerProperties inferenceConfig, MachineLearningOperatingSystemType? osType) : base(description, properties, tags, isAnonymous, isArchived) + { + AutoRebuild = autoRebuild; + Build = build; + CondaFile = condaFile; + EnvironmentType = environmentType; + Image = image; + InferenceConfig = inferenceConfig; + OSType = osType; + } + + /// + /// Defines if image needs to be rebuilt based on base image changes. + /// Serialized Name: EnvironmentVersion.autoRebuild + /// + public AutoRebuildSetting? AutoRebuild { get; set; } + /// + /// Configuration settings for Docker build context. + /// Serialized Name: EnvironmentVersion.build + /// + 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" /> + /// Serialized Name: EnvironmentVersion.condaFile + /// + 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" /> + /// Serialized Name: EnvironmentVersion.environmentType + /// + public MachineLearningEnvironmentType? EnvironmentType { get; } + /// + /// 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" /> + /// Serialized Name: EnvironmentVersion.image + /// + public string Image { get; set; } + /// + /// Defines configuration specific to inference. + /// Serialized Name: EnvironmentVersion.inferenceConfig + /// + public MachineLearningInferenceContainerProperties InferenceConfig { get; set; } + /// + /// The OS type of the environment. + /// Serialized Name: EnvironmentVersion.osType + /// + public MachineLearningOperatingSystemType? OSType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningError.Serialization.cs new file mode 100644 index 000000000000..3f28455a68e7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningError.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningError + { + internal static MachineLearningError DeserializeMachineLearningError(JsonElement element) + { + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("error")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + error = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningError(error.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningError.cs new file mode 100644 index 000000000000..8b3edefbbb58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningError.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + /// Serialized Name: ErrorResponse + /// + public partial class MachineLearningError + { + /// Initializes a new instance of MachineLearningError. + internal MachineLearningError() + { + } + + /// Initializes a new instance of MachineLearningError. + /// + /// The error object. + /// Serialized Name: ErrorResponse.error + /// + internal MachineLearningError(ResponseError error) + { + Error = error; + } + + /// + /// The error object. + /// Serialized Name: ErrorResponse.error + /// + public ResponseError Error { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrice.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrice.Serialization.cs new file mode 100644 index 000000000000..e78dfdb04728 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrice.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEstimatedVmPrice + { + internal static MachineLearningEstimatedVmPrice DeserializeMachineLearningEstimatedVmPrice(JsonElement element) + { + double retailPrice = default; + MachineLearningVmPriceOSType osType = default; + MachineLearningVmTier vmTier = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("retailPrice")) + { + retailPrice = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("osType")) + { + osType = new MachineLearningVmPriceOSType(property.Value.GetString()); + continue; + } + if (property.NameEquals("vmTier")) + { + vmTier = new MachineLearningVmTier(property.Value.GetString()); + continue; + } + } + return new MachineLearningEstimatedVmPrice(retailPrice, osType, vmTier); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrice.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrice.cs new file mode 100644 index 000000000000..49de1b8ca9aa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrice.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The estimated price info for using a VM of a particular OS type, tier, etc. + /// Serialized Name: EstimatedVMPrice + /// + public partial class MachineLearningEstimatedVmPrice + { + /// Initializes a new instance of MachineLearningEstimatedVmPrice. + /// + /// The price charged for using the VM. + /// Serialized Name: EstimatedVMPrice.retailPrice + /// + /// + /// Operating system type used by the VM. + /// Serialized Name: EstimatedVMPrice.osType + /// + /// + /// The type of the VM. + /// Serialized Name: EstimatedVMPrice.vmTier + /// + internal MachineLearningEstimatedVmPrice(double retailPrice, MachineLearningVmPriceOSType osType, MachineLearningVmTier vmTier) + { + RetailPrice = retailPrice; + OSType = osType; + VmTier = vmTier; + } + + /// + /// The price charged for using the VM. + /// Serialized Name: EstimatedVMPrice.retailPrice + /// + public double RetailPrice { get; } + /// + /// Operating system type used by the VM. + /// Serialized Name: EstimatedVMPrice.osType + /// + public MachineLearningVmPriceOSType OSType { get; } + /// + /// The type of the VM. + /// Serialized Name: EstimatedVMPrice.vmTier + /// + public MachineLearningVmTier VmTier { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrices.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrices.Serialization.cs new file mode 100644 index 000000000000..23b6d0f1dcc5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrices.Serialization.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningEstimatedVmPrices + { + internal static MachineLearningEstimatedVmPrices DeserializeMachineLearningEstimatedVmPrices(JsonElement element) + { + MachineLearningBillingCurrency billingCurrency = default; + MachineLearningUnitOfMeasure unitOfMeasure = default; + IReadOnlyList values = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("billingCurrency")) + { + billingCurrency = new MachineLearningBillingCurrency(property.Value.GetString()); + continue; + } + if (property.NameEquals("unitOfMeasure")) + { + unitOfMeasure = new MachineLearningUnitOfMeasure(property.Value.GetString()); + continue; + } + if (property.NameEquals("values")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningEstimatedVmPrice.DeserializeMachineLearningEstimatedVmPrice(item)); + } + values = array; + continue; + } + } + return new MachineLearningEstimatedVmPrices(billingCurrency, unitOfMeasure, values); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrices.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrices.cs new file mode 100644 index 000000000000..5a5f08ba5c86 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningEstimatedVmPrices.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The estimated price info for using a VM. + /// Serialized Name: EstimatedVMPrices + /// + public partial class MachineLearningEstimatedVmPrices + { + /// Initializes a new instance of MachineLearningEstimatedVmPrices. + /// + /// Three lettered code specifying the currency of the VM price. Example: USD + /// Serialized Name: EstimatedVMPrices.billingCurrency + /// + /// + /// The unit of time measurement for the specified VM price. Example: OneHour + /// Serialized Name: EstimatedVMPrices.unitOfMeasure + /// + /// + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + /// Serialized Name: EstimatedVMPrices.values + /// + /// is null. + internal MachineLearningEstimatedVmPrices(MachineLearningBillingCurrency billingCurrency, MachineLearningUnitOfMeasure unitOfMeasure, IEnumerable values) + { + Argument.AssertNotNull(values, nameof(values)); + + BillingCurrency = billingCurrency; + UnitOfMeasure = unitOfMeasure; + Values = values.ToList(); + } + + /// Initializes a new instance of MachineLearningEstimatedVmPrices. + /// + /// Three lettered code specifying the currency of the VM price. Example: USD + /// Serialized Name: EstimatedVMPrices.billingCurrency + /// + /// + /// The unit of time measurement for the specified VM price. Example: OneHour + /// Serialized Name: EstimatedVMPrices.unitOfMeasure + /// + /// + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + /// Serialized Name: EstimatedVMPrices.values + /// + internal MachineLearningEstimatedVmPrices(MachineLearningBillingCurrency billingCurrency, MachineLearningUnitOfMeasure unitOfMeasure, IReadOnlyList values) + { + BillingCurrency = billingCurrency; + UnitOfMeasure = unitOfMeasure; + Values = values; + } + + /// + /// Three lettered code specifying the currency of the VM price. Example: USD + /// Serialized Name: EstimatedVMPrices.billingCurrency + /// + public MachineLearningBillingCurrency BillingCurrency { get; } + /// + /// The unit of time measurement for the specified VM price. Example: OneHour + /// Serialized Name: EstimatedVMPrices.unitOfMeasure + /// + public MachineLearningUnitOfMeasure UnitOfMeasure { get; } + /// + /// The list of estimated prices for using a VM of a particular OS type, tier, etc. + /// Serialized Name: EstimatedVMPrices.values + /// + public IReadOnlyList Values { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureLag.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureLag.cs new file mode 100644 index 000000000000..e4587082f976 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeatureLag.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Flag for generating lags for the numeric features. + /// Serialized Name: FeatureLags + /// + public readonly partial struct MachineLearningFeatureLag : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningFeatureLag(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string AutoValue = "Auto"; + + /// + /// No feature lags generated. + /// Serialized Name: FeatureLags.None + /// + public static MachineLearningFeatureLag None { get; } = new MachineLearningFeatureLag(NoneValue); + /// + /// System auto-generates feature lags. + /// Serialized Name: FeatureLags.Auto + /// + public static MachineLearningFeatureLag Auto { get; } = new MachineLearningFeatureLag(AutoValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningFeatureLag left, MachineLearningFeatureLag right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningFeatureLag left, MachineLearningFeatureLag right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningFeatureLag(string value) => new MachineLearningFeatureLag(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningFeatureLag other && Equals(other); + /// + public bool Equals(MachineLearningFeatureLag other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationMode.cs new file mode 100644 index 000000000000..440fb6c5d604 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationMode.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Featurization mode - determines data featurization mode. + /// Serialized Name: FeaturizationMode + /// + public readonly partial struct MachineLearningFeaturizationMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningFeaturizationMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutoValue = "Auto"; + private const string CustomValue = "Custom"; + private const string OffValue = "Off"; + + /// + /// Auto mode, system performs featurization without any custom featurization inputs. + /// Serialized Name: FeaturizationMode.Auto + /// + public static MachineLearningFeaturizationMode Auto { get; } = new MachineLearningFeaturizationMode(AutoValue); + /// + /// Custom featurization. + /// Serialized Name: FeaturizationMode.Custom + /// + public static MachineLearningFeaturizationMode Custom { get; } = new MachineLearningFeaturizationMode(CustomValue); + /// + /// Featurization off. 'Forecasting' task cannot use this value. + /// Serialized Name: FeaturizationMode.Off + /// + public static MachineLearningFeaturizationMode Off { get; } = new MachineLearningFeaturizationMode(OffValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningFeaturizationMode left, MachineLearningFeaturizationMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningFeaturizationMode left, MachineLearningFeaturizationMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningFeaturizationMode(string value) => new MachineLearningFeaturizationMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningFeaturizationMode other && Equals(other); + /// + public bool Equals(MachineLearningFeaturizationMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationSettings.Serialization.cs new file mode 100644 index 000000000000..d28b3117b4c8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationSettings.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFeaturizationSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DatasetLanguage)) + { + if (DatasetLanguage != null) + { + writer.WritePropertyName("datasetLanguage"); + writer.WriteStringValue(DatasetLanguage); + } + else + { + writer.WriteNull("datasetLanguage"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFeaturizationSettings DeserializeMachineLearningFeaturizationSettings(JsonElement element) + { + Optional datasetLanguage = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("datasetLanguage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + datasetLanguage = null; + continue; + } + datasetLanguage = property.Value.GetString(); + continue; + } + } + return new MachineLearningFeaturizationSettings(datasetLanguage.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationSettings.cs new file mode 100644 index 000000000000..f6ba130f001c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFeaturizationSettings.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Featurization Configuration. + /// Serialized Name: FeaturizationSettings + /// + public partial class MachineLearningFeaturizationSettings + { + /// Initializes a new instance of MachineLearningFeaturizationSettings. + public MachineLearningFeaturizationSettings() + { + } + + /// Initializes a new instance of MachineLearningFeaturizationSettings. + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// + internal MachineLearningFeaturizationSettings(string datasetLanguage) + { + DatasetLanguage = datasetLanguage; + } + + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// + public string DatasetLanguage { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlavorData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlavorData.Serialization.cs new file mode 100644 index 000000000000..8a5d0c5b8acf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlavorData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFlavorData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Data)) + { + if (Data != null) + { + writer.WritePropertyName("data"); + writer.WriteStartObject(); + foreach (var item in Data) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("data"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningFlavorData DeserializeMachineLearningFlavorData(JsonElement element) + { + Optional> data = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("data")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + data = 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, property0.Value.GetString()); + } + } + data = dictionary; + continue; + } + } + return new MachineLearningFlavorData(Optional.ToDictionary(data)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlavorData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlavorData.cs new file mode 100644 index 000000000000..cb0d2ee9e7a7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlavorData.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFlavorData. + /// Serialized Name: FlavorData + /// + public partial class MachineLearningFlavorData + { + /// Initializes a new instance of MachineLearningFlavorData. + public MachineLearningFlavorData() + { + Data = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningFlavorData. + /// + /// Model flavor-specific data. + /// Serialized Name: FlavorData.data + /// + internal MachineLearningFlavorData(IDictionary data) + { + Data = data; + } + + /// + /// Model flavor-specific data. + /// Serialized Name: FlavorData.data + /// + public IDictionary Data { get; set; } + } +} 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 new file mode 100644 index 000000000000..d4a17b04199d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFlowModelJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningFlowModelJobInput DeserializeMachineLearningFlowModelJobInput(JsonElement element) + { + Optional mode = default; + Uri uri = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningFlowModelJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs new file mode 100644 index 000000000000..c841a969897f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFlowModelJobInput. + /// Serialized Name: MLFlowModelJobInput + /// + public partial class MachineLearningFlowModelJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningFlowModelJobInput. + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + /// is null. + public MachineLearningFlowModelJobInput(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + JobInputType = JobInputType.MlflowModel; + } + + /// Initializes a new instance of MachineLearningFlowModelJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + internal MachineLearningFlowModelJobInput(string description, JobInputType jobInputType, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType) + { + Mode = mode; + Uri = uri; + JobInputType = jobInputType; + } + + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + public MachineLearningInputDeliveryMode? Mode { get; set; } + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..6629e1531c6d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFlowModelJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningFlowModelJobOutput DeserializeMachineLearningFlowModelJobOutput(JsonElement element) + { + Optional mode = default; + Optional uri = default; + Optional description = default; + JobOutputType jobOutputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutputType")) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningFlowModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs new file mode 100644 index 000000000000..e16affaefb93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFlowModelJobOutput.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFlowModelJobOutput. + /// Serialized Name: MLFlowModelJobOutput + /// + public partial class MachineLearningFlowModelJobOutput : MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningFlowModelJobOutput. + public MachineLearningFlowModelJobOutput() + { + JobOutputType = JobOutputType.MlflowModel; + } + + /// Initializes a new instance of MachineLearningFlowModelJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + internal MachineLearningFlowModelJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + { + Mode = mode; + Uri = uri; + JobOutputType = jobOutputType; + } + + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + public MachineLearningOutputDeliveryMode? Mode { get; set; } + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoint.Serialization.cs new file mode 100644 index 000000000000..ba546a5a7852 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoint.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFqdnEndpoint + { + internal static MachineLearningFqdnEndpoint DeserializeMachineLearningFqdnEndpoint(JsonElement element) + { + Optional domainName = default; + Optional> endpointDetails = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("domainName")) + { + domainName = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpointDetails")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFqdnEndpointDetail.DeserializeMachineLearningFqdnEndpointDetail(item)); + } + endpointDetails = array; + continue; + } + } + return new MachineLearningFqdnEndpoint(domainName.Value, Optional.ToList(endpointDetails)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoint.cs new file mode 100644 index 000000000000..f7381a62baaf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoint.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFqdnEndpoint. + /// Serialized Name: FqdnEndpoint + /// + public partial class MachineLearningFqdnEndpoint + { + /// Initializes a new instance of MachineLearningFqdnEndpoint. + internal MachineLearningFqdnEndpoint() + { + EndpointDetails = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningFqdnEndpoint. + /// Serialized Name: FqdnEndpoint.domainName. + /// Serialized Name: FqdnEndpoint.endpointDetails. + internal MachineLearningFqdnEndpoint(string domainName, IReadOnlyList endpointDetails) + { + DomainName = domainName; + EndpointDetails = endpointDetails; + } + + /// Serialized Name: FqdnEndpoint.domainName. + public string DomainName { get; } + /// Serialized Name: FqdnEndpoint.endpointDetails. + public IReadOnlyList EndpointDetails { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointDetail.Serialization.cs new file mode 100644 index 000000000000..02fcd1a26fd8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointDetail.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFqdnEndpointDetail + { + internal static MachineLearningFqdnEndpointDetail DeserializeMachineLearningFqdnEndpointDetail(JsonElement element) + { + Optional port = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("port")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + port = property.Value.GetInt32(); + continue; + } + } + return new MachineLearningFqdnEndpointDetail(Optional.ToNullable(port)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointDetail.cs new file mode 100644 index 000000000000..ba17bae08b33 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointDetail.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFqdnEndpointDetail. + /// Serialized Name: FqdnEndpointDetail + /// + public partial class MachineLearningFqdnEndpointDetail + { + /// Initializes a new instance of MachineLearningFqdnEndpointDetail. + internal MachineLearningFqdnEndpointDetail() + { + } + + /// Initializes a new instance of MachineLearningFqdnEndpointDetail. + /// Serialized Name: FqdnEndpointDetail.port. + internal MachineLearningFqdnEndpointDetail(int? port) + { + Port = port; + } + + /// Serialized Name: FqdnEndpointDetail.port. + public int? Port { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.Serialization.cs new file mode 100644 index 000000000000..daaf397a2dfc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFqdnEndpoints + { + internal static MachineLearningFqdnEndpoints DeserializeMachineLearningFqdnEndpoints(JsonElement element) + { + Optional properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningFqdnEndpointsProperties.DeserializeMachineLearningFqdnEndpointsProperties(property.Value); + continue; + } + } + return new MachineLearningFqdnEndpoints(properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs new file mode 100644 index 000000000000..7854af31129c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpoints.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFqdnEndpoints. + /// Serialized Name: FqdnEndpoints + /// + public partial class MachineLearningFqdnEndpoints + { + /// Initializes a new instance of MachineLearningFqdnEndpoints. + internal MachineLearningFqdnEndpoints() + { + } + + /// Initializes a new instance of MachineLearningFqdnEndpoints. + /// Serialized Name: FqdnEndpoints.properties. + internal MachineLearningFqdnEndpoints(MachineLearningFqdnEndpointsProperties properties) + { + Properties = properties; + } + + /// Serialized Name: FqdnEndpoints.properties. + public MachineLearningFqdnEndpointsProperties Properties { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointsProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointsProperties.Serialization.cs new file mode 100644 index 000000000000..6aaa9e585d98 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointsProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningFqdnEndpointsProperties + { + internal static MachineLearningFqdnEndpointsProperties DeserializeMachineLearningFqdnEndpointsProperties(JsonElement element) + { + Optional category = default; + Optional> endpoints = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("category")) + { + category = property.Value.GetString(); + continue; + } + if (property.NameEquals("endpoints")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningFqdnEndpoint.DeserializeMachineLearningFqdnEndpoint(item)); + } + endpoints = array; + continue; + } + } + return new MachineLearningFqdnEndpointsProperties(category.Value, Optional.ToList(endpoints)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointsProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointsProperties.cs new file mode 100644 index 000000000000..cd24743a4ca4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningFqdnEndpointsProperties.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningFqdnEndpointsProperties. + /// Serialized Name: FqdnEndpointsProperties + /// + public partial class MachineLearningFqdnEndpointsProperties + { + /// Initializes a new instance of MachineLearningFqdnEndpointsProperties. + internal MachineLearningFqdnEndpointsProperties() + { + Endpoints = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningFqdnEndpointsProperties. + /// Serialized Name: FqdnEndpointsProperties.category. + /// Serialized Name: FqdnEndpointsProperties.endpoints. + internal MachineLearningFqdnEndpointsProperties(string category, IReadOnlyList endpoints) + { + Category = category; + Endpoints = endpoints; + } + + /// Serialized Name: FqdnEndpointsProperties.category. + public string Category { get; } + /// Serialized Name: FqdnEndpointsProperties.endpoints. + public IReadOnlyList Endpoints { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningGoal.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningGoal.cs new file mode 100644 index 000000000000..99d61d5db686 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningGoal.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Defines supported metric goals for hyperparameter tuning + /// Serialized Name: Goal + /// + public readonly partial struct MachineLearningGoal : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningGoal(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MinimizeValue = "Minimize"; + private const string MaximizeValue = "Maximize"; + + /// + /// Minimize + /// Serialized Name: Goal.Minimize + /// + public static MachineLearningGoal Minimize { get; } = new MachineLearningGoal(MinimizeValue); + /// + /// Maximize + /// Serialized Name: Goal.Maximize + /// + public static MachineLearningGoal Maximize { get; } = new MachineLearningGoal(MaximizeValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningGoal left, MachineLearningGoal right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningGoal left, MachineLearningGoal right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningGoal(string value) => new MachineLearningGoal(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningGoal other && Equals(other); + /// + public bool Equals(MachineLearningGoal other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightCompute.Serialization.cs new file mode 100644 index 000000000000..a90be86ad181 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightCompute.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningHDInsightCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningHDInsightCompute DeserializeMachineLearningHDInsightCompute(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningHDInsightProperties.DeserializeMachineLearningHDInsightProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningHDInsightCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightCompute.cs new file mode 100644 index 000000000000..bb57e1644269 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightCompute.cs @@ -0,0 +1,83 @@ +// 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 +{ + /// + /// A HDInsight compute. + /// Serialized Name: HDInsight + /// + public partial class MachineLearningHDInsightCompute : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningHDInsightCompute. + public MachineLearningHDInsightCompute() + { + ComputeType = ComputeType.HDInsight; + } + + /// Initializes a new instance of MachineLearningHDInsightCompute. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// + /// HDInsight compute properties + /// Serialized Name: HDInsightSchema.properties + /// + internal MachineLearningHDInsightCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningHDInsightProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// + /// HDInsight compute properties + /// Serialized Name: HDInsightSchema.properties + /// + public MachineLearningHDInsightProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightProperties.Serialization.cs new file mode 100644 index 000000000000..3a17393e0d8d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightProperties.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningHDInsightProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SshPort)) + { + writer.WritePropertyName("sshPort"); + writer.WriteNumberValue(SshPort.Value); + } + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(AdministratorAccount)) + { + if (AdministratorAccount != null) + { + writer.WritePropertyName("administratorAccount"); + writer.WriteObjectValue(AdministratorAccount); + } + else + { + writer.WriteNull("administratorAccount"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningHDInsightProperties DeserializeMachineLearningHDInsightProperties(JsonElement element) + { + Optional sshPort = default; + Optional address = default; + Optional administratorAccount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sshPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("address")) + { + address = property.Value.GetString(); + continue; + } + if (property.NameEquals("administratorAccount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + administratorAccount = null; + continue; + } + administratorAccount = MachineLearningVmSshCredentials.DeserializeMachineLearningVmSshCredentials(property.Value); + continue; + } + } + return new MachineLearningHDInsightProperties(Optional.ToNullable(sshPort), address.Value, administratorAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightProperties.cs new file mode 100644 index 000000000000..7ba64f7530e7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningHDInsightProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// HDInsight compute properties + /// Serialized Name: HDInsightProperties + /// + public partial class MachineLearningHDInsightProperties + { + /// Initializes a new instance of MachineLearningHDInsightProperties. + public MachineLearningHDInsightProperties() + { + } + + /// Initializes a new instance of MachineLearningHDInsightProperties. + /// + /// Port open for ssh connections on the master node of the cluster. + /// Serialized Name: HDInsightProperties.sshPort + /// + /// + /// Public IP address of the master node of the cluster. + /// Serialized Name: HDInsightProperties.address + /// + /// + /// Admin credentials for master node of the cluster + /// Serialized Name: HDInsightProperties.administratorAccount + /// + internal MachineLearningHDInsightProperties(int? sshPort, string address, MachineLearningVmSshCredentials administratorAccount) + { + SshPort = sshPort; + Address = address; + AdministratorAccount = administratorAccount; + } + + /// + /// Port open for ssh connections on the master node of the cluster. + /// Serialized Name: HDInsightProperties.sshPort + /// + public int? SshPort { get; set; } + /// + /// Public IP address of the master node of the cluster. + /// Serialized Name: HDInsightProperties.address + /// + public string Address { get; set; } + /// + /// Admin credentials for master node of the cluster + /// Serialized Name: HDInsightProperties.administratorAccount + /// + public MachineLearningVmSshCredentials AdministratorAccount { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdAssetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdAssetReference.Serialization.cs new file mode 100644 index 000000000000..4890ac62243a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdAssetReference.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningIdAssetReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("assetId"); + writer.WriteStringValue(AssetId); + writer.WritePropertyName("referenceType"); + writer.WriteStringValue(ReferenceType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningIdAssetReference DeserializeMachineLearningIdAssetReference(JsonElement element) + { + ResourceIdentifier assetId = default; + ReferenceType referenceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("assetId")) + { + assetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("referenceType")) + { + referenceType = new ReferenceType(property.Value.GetString()); + continue; + } + } + return new MachineLearningIdAssetReference(referenceType, assetId); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdAssetReference.cs new file mode 100644 index 000000000000..ad3b554d55da --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdAssetReference.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Reference to an asset via its ARM resource ID. + /// Serialized Name: IdAssetReference + /// + public partial class MachineLearningIdAssetReference : MachineLearningAssetReferenceBase + { + /// Initializes a new instance of MachineLearningIdAssetReference. + /// + /// [Required] ARM resource ID of the asset. + /// Serialized Name: IdAssetReference.assetId + /// + /// is null. + public MachineLearningIdAssetReference(ResourceIdentifier assetId) + { + Argument.AssertNotNull(assetId, nameof(assetId)); + + AssetId = assetId; + ReferenceType = ReferenceType.Id; + } + + /// Initializes a new instance of MachineLearningIdAssetReference. + /// + /// [Required] Specifies the type of asset reference. + /// Serialized Name: AssetReferenceBase.referenceType + /// + /// + /// [Required] ARM resource ID of the asset. + /// Serialized Name: IdAssetReference.assetId + /// + internal MachineLearningIdAssetReference(ReferenceType referenceType, ResourceIdentifier assetId) : base(referenceType) + { + AssetId = assetId; + ReferenceType = referenceType; + } + + /// + /// [Required] ARM resource ID of the asset. + /// Serialized Name: IdAssetReference.assetId + /// + public ResourceIdentifier AssetId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdentityConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdentityConfiguration.Serialization.cs new file mode 100644 index 000000000000..22e28705fc80 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdentityConfiguration.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningIdentityConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("identityType"); + writer.WriteStringValue(IdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningIdentityConfiguration DeserializeMachineLearningIdentityConfiguration(JsonElement element) + { + if (element.TryGetProperty("identityType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AMLToken": return AmlToken.DeserializeAmlToken(element); + case "Managed": return MachineLearningManagedIdentity.DeserializeMachineLearningManagedIdentity(element); + case "UserIdentity": return MachineLearningUserIdentity.DeserializeMachineLearningUserIdentity(element); + } + } + return UnknownIdentityConfiguration.DeserializeUnknownIdentityConfiguration(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdentityConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdentityConfiguration.cs new file mode 100644 index 000000000000..55b9de4036b9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningIdentityConfiguration.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Base definition for identity configuration. + /// Serialized Name: IdentityConfiguration + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningIdentityConfiguration + { + /// Initializes a new instance of MachineLearningIdentityConfiguration. + protected MachineLearningIdentityConfiguration() + { + } + + /// Initializes a new instance of MachineLearningIdentityConfiguration. + /// + /// [Required] Specifies the type of identity framework. + /// Serialized Name: IdentityConfiguration.identityType + /// + internal MachineLearningIdentityConfiguration(IdentityConfigurationType identityType) + { + IdentityType = identityType; + } + + /// + /// [Required] Specifies the type of identity framework. + /// Serialized Name: IdentityConfiguration.identityType + /// + internal IdentityConfigurationType IdentityType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerProperties.Serialization.cs new file mode 100644 index 000000000000..8803a7bf79c2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerProperties.Serialization.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningInferenceContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(LivenessRoute)) + { + writer.WritePropertyName("livenessRoute"); + writer.WriteObjectValue(LivenessRoute); + } + if (Optional.IsDefined(ReadinessRoute)) + { + writer.WritePropertyName("readinessRoute"); + writer.WriteObjectValue(ReadinessRoute); + } + if (Optional.IsDefined(ScoringRoute)) + { + writer.WritePropertyName("scoringRoute"); + writer.WriteObjectValue(ScoringRoute); + } + writer.WriteEndObject(); + } + + internal static MachineLearningInferenceContainerProperties DeserializeMachineLearningInferenceContainerProperties(JsonElement element) + { + Optional livenessRoute = default; + Optional readinessRoute = default; + Optional scoringRoute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("livenessRoute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + livenessRoute = MachineLearningInferenceContainerRoute.DeserializeMachineLearningInferenceContainerRoute(property.Value); + continue; + } + if (property.NameEquals("readinessRoute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + readinessRoute = MachineLearningInferenceContainerRoute.DeserializeMachineLearningInferenceContainerRoute(property.Value); + continue; + } + if (property.NameEquals("scoringRoute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scoringRoute = MachineLearningInferenceContainerRoute.DeserializeMachineLearningInferenceContainerRoute(property.Value); + continue; + } + } + return new MachineLearningInferenceContainerProperties(livenessRoute.Value, readinessRoute.Value, scoringRoute.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerProperties.cs new file mode 100644 index 000000000000..9002bcbcb4d6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerProperties.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningInferenceContainerProperties. + /// Serialized Name: InferenceContainerProperties + /// + public partial class MachineLearningInferenceContainerProperties + { + /// Initializes a new instance of MachineLearningInferenceContainerProperties. + public MachineLearningInferenceContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningInferenceContainerProperties. + /// + /// The route to check the liveness of the inference server container. + /// Serialized Name: InferenceContainerProperties.livenessRoute + /// + /// + /// The route to check the readiness of the inference server container. + /// Serialized Name: InferenceContainerProperties.readinessRoute + /// + /// + /// The port to send the scoring requests to, within the inference server container. + /// Serialized Name: InferenceContainerProperties.scoringRoute + /// + internal MachineLearningInferenceContainerProperties(MachineLearningInferenceContainerRoute livenessRoute, MachineLearningInferenceContainerRoute readinessRoute, MachineLearningInferenceContainerRoute scoringRoute) + { + LivenessRoute = livenessRoute; + ReadinessRoute = readinessRoute; + ScoringRoute = scoringRoute; + } + + /// + /// The route to check the liveness of the inference server container. + /// Serialized Name: InferenceContainerProperties.livenessRoute + /// + public MachineLearningInferenceContainerRoute LivenessRoute { get; set; } + /// + /// The route to check the readiness of the inference server container. + /// Serialized Name: InferenceContainerProperties.readinessRoute + /// + public MachineLearningInferenceContainerRoute ReadinessRoute { get; set; } + /// + /// The port to send the scoring requests to, within the inference server container. + /// Serialized Name: InferenceContainerProperties.scoringRoute + /// + public MachineLearningInferenceContainerRoute ScoringRoute { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerRoute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerRoute.Serialization.cs new file mode 100644 index 000000000000..c91f10181d60 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerRoute.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningInferenceContainerRoute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("path"); + writer.WriteStringValue(Path); + writer.WritePropertyName("port"); + writer.WriteNumberValue(Port); + writer.WriteEndObject(); + } + + internal static MachineLearningInferenceContainerRoute DeserializeMachineLearningInferenceContainerRoute(JsonElement element) + { + string path = default; + int port = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("path")) + { + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("port")) + { + port = property.Value.GetInt32(); + continue; + } + } + return new MachineLearningInferenceContainerRoute(path, port); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerRoute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerRoute.cs new file mode 100644 index 000000000000..7d57f1e7ec77 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInferenceContainerRoute.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningInferenceContainerRoute. + /// Serialized Name: Route + /// + public partial class MachineLearningInferenceContainerRoute + { + /// Initializes a new instance of MachineLearningInferenceContainerRoute. + /// + /// [Required] The path for the route. + /// Serialized Name: Route.path + /// + /// + /// [Required] The port for the route. + /// Serialized Name: Route.port + /// + /// is null. + public MachineLearningInferenceContainerRoute(string path, int port) + { + Argument.AssertNotNull(path, nameof(path)); + + Path = path; + Port = port; + } + + /// + /// [Required] The path for the route. + /// Serialized Name: Route.path + /// + public string Path { get; set; } + /// + /// [Required] The port for the route. + /// Serialized Name: Route.port + /// + public int Port { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInputDeliveryMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInputDeliveryMode.cs new file mode 100644 index 000000000000..24801adcba93 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInputDeliveryMode.cs @@ -0,0 +1,84 @@ +// 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 input data delivery mode. + /// Serialized Name: InputDeliveryMode + /// + public readonly partial struct MachineLearningInputDeliveryMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningInputDeliveryMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadOnlyMountValue = "ReadOnlyMount"; + private const string ReadWriteMountValue = "ReadWriteMount"; + private const string DownloadValue = "Download"; + private const string DirectValue = "Direct"; + private const string EvalMountValue = "EvalMount"; + private const string EvalDownloadValue = "EvalDownload"; + + /// + /// ReadOnlyMount + /// Serialized Name: InputDeliveryMode.ReadOnlyMount + /// + public static MachineLearningInputDeliveryMode ReadOnlyMount { get; } = new MachineLearningInputDeliveryMode(ReadOnlyMountValue); + /// + /// ReadWriteMount + /// Serialized Name: InputDeliveryMode.ReadWriteMount + /// + public static MachineLearningInputDeliveryMode ReadWriteMount { get; } = new MachineLearningInputDeliveryMode(ReadWriteMountValue); + /// + /// Download + /// Serialized Name: InputDeliveryMode.Download + /// + public static MachineLearningInputDeliveryMode Download { get; } = new MachineLearningInputDeliveryMode(DownloadValue); + /// + /// Direct + /// Serialized Name: InputDeliveryMode.Direct + /// + public static MachineLearningInputDeliveryMode Direct { get; } = new MachineLearningInputDeliveryMode(DirectValue); + /// + /// EvalMount + /// Serialized Name: InputDeliveryMode.EvalMount + /// + public static MachineLearningInputDeliveryMode EvalMount { get; } = new MachineLearningInputDeliveryMode(EvalMountValue); + /// + /// EvalDownload + /// Serialized Name: InputDeliveryMode.EvalDownload + /// + public static MachineLearningInputDeliveryMode EvalDownload { get; } = new MachineLearningInputDeliveryMode(EvalDownloadValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningInputDeliveryMode left, MachineLearningInputDeliveryMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningInputDeliveryMode left, MachineLearningInputDeliveryMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningInputDeliveryMode(string value) => new MachineLearningInputDeliveryMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningInputDeliveryMode other && Equals(other); + /// + public bool Equals(MachineLearningInputDeliveryMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchema.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchema.Serialization.cs new file mode 100644 index 000000000000..ba7ea6c981a3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchema.Serialization.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningInstanceTypeSchema : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(NodeSelector)) + { + if (NodeSelector != null) + { + writer.WritePropertyName("nodeSelector"); + writer.WriteStartObject(); + foreach (var item in NodeSelector) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("nodeSelector"); + } + } + if (Optional.IsDefined(Resources)) + { + writer.WritePropertyName("resources"); + writer.WriteObjectValue(Resources); + } + writer.WriteEndObject(); + } + + internal static MachineLearningInstanceTypeSchema DeserializeMachineLearningInstanceTypeSchema(JsonElement element) + { + Optional> nodeSelector = default; + Optional resources = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeSelector")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nodeSelector = 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, property0.Value.GetString()); + } + } + nodeSelector = dictionary; + continue; + } + if (property.NameEquals("resources")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resources = MachineLearningInstanceTypeSchemaResources.DeserializeMachineLearningInstanceTypeSchemaResources(property.Value); + continue; + } + } + return new MachineLearningInstanceTypeSchema(Optional.ToDictionary(nodeSelector), resources.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchema.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchema.cs new file mode 100644 index 000000000000..247534e7b31d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchema.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Instance type schema. + /// Serialized Name: InstanceTypeSchema + /// + public partial class MachineLearningInstanceTypeSchema + { + /// Initializes a new instance of MachineLearningInstanceTypeSchema. + public MachineLearningInstanceTypeSchema() + { + NodeSelector = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningInstanceTypeSchema. + /// + /// Node Selector + /// Serialized Name: InstanceTypeSchema.nodeSelector + /// + /// + /// Resource requests/limits for this instance type + /// Serialized Name: InstanceTypeSchema.resources + /// + internal MachineLearningInstanceTypeSchema(IDictionary nodeSelector, MachineLearningInstanceTypeSchemaResources resources) + { + NodeSelector = nodeSelector; + Resources = resources; + } + + /// + /// Node Selector + /// Serialized Name: InstanceTypeSchema.nodeSelector + /// + public IDictionary NodeSelector { get; set; } + /// + /// Resource requests/limits for this instance type + /// Serialized Name: InstanceTypeSchema.resources + /// + public MachineLearningInstanceTypeSchemaResources Resources { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchemaResources.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchemaResources.Serialization.cs new file mode 100644 index 000000000000..3583cb0f0acf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchemaResources.Serialization.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningInstanceTypeSchemaResources : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Requests)) + { + writer.WritePropertyName("requests"); + writer.WriteStartObject(); + foreach (var item in Requests) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Limits)) + { + writer.WritePropertyName("limits"); + writer.WriteStartObject(); + foreach (var item in Limits) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static MachineLearningInstanceTypeSchemaResources DeserializeMachineLearningInstanceTypeSchemaResources(JsonElement element) + { + Optional> requests = default; + Optional> limits = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("requests")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + requests = dictionary; + continue; + } + if (property.NameEquals("limits")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + limits = dictionary; + continue; + } + } + return new MachineLearningInstanceTypeSchemaResources(Optional.ToDictionary(requests), Optional.ToDictionary(limits)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchemaResources.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchemaResources.cs new file mode 100644 index 000000000000..97022990c130 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningInstanceTypeSchemaResources.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Resource requests/limits for this instance type + /// Serialized Name: InstanceTypeSchemaResources + /// + public partial class MachineLearningInstanceTypeSchemaResources + { + /// Initializes a new instance of MachineLearningInstanceTypeSchemaResources. + public MachineLearningInstanceTypeSchemaResources() + { + Requests = new ChangeTrackingDictionary(); + Limits = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningInstanceTypeSchemaResources. + /// + /// Resource requests for this instance type + /// Serialized Name: InstanceTypeSchemaResources.requests + /// + /// + /// Resource limits for this instance type + /// Serialized Name: InstanceTypeSchemaResources.limits + /// + internal MachineLearningInstanceTypeSchemaResources(IDictionary requests, IDictionary limits) + { + Requests = requests; + Limits = limits; + } + + /// + /// Resource requests for this instance type + /// Serialized Name: InstanceTypeSchemaResources.requests + /// + public IDictionary Requests { get; } + /// + /// Resource limits for this instance type + /// Serialized Name: InstanceTypeSchemaResources.limits + /// + public IDictionary Limits { get; } + } +} 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 new file mode 100644 index 000000000000..92a2b3a0ee31 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.Serialization.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningJobInput DeserializeMachineLearningJobInput(JsonElement element) + { + if (element.TryGetProperty("jobInputType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "custom_model": return MachineLearningCustomModelJobInput.DeserializeMachineLearningCustomModelJobInput(element); + case "literal": return MachineLearningLiteralJobInput.DeserializeMachineLearningLiteralJobInput(element); + case "mlflow_model": return MachineLearningFlowModelJobInput.DeserializeMachineLearningFlowModelJobInput(element); + case "mltable": return MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(element); + case "triton_model": return MachineLearningTritonModelJobInput.DeserializeMachineLearningTritonModelJobInput(element); + case "uri_file": return MachineLearningUriFileJobInput.DeserializeMachineLearningUriFileJobInput(element); + case "uri_folder": return MachineLearningUriFolderJobInput.DeserializeMachineLearningUriFolderJobInput(element); + } + } + return UnknownJobInput.DeserializeUnknownJobInput(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs new file mode 100644 index 000000000000..3b94e614514a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobInput.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Command job definition. + /// Serialized Name: JobInput + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningJobInput. + protected MachineLearningJobInput() + { + } + + /// Initializes a new instance of MachineLearningJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + internal MachineLearningJobInput(string description, JobInputType jobInputType) + { + Description = description; + JobInputType = jobInputType; + } + + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + public string Description { get; set; } + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + internal JobInputType JobInputType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobLimits.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobLimits.Serialization.cs new file mode 100644 index 000000000000..f199e00c7a08 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobLimits.Serialization.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobLimits : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobLimitsType"); + writer.WriteStringValue(JobLimitsType.ToString()); + if (Optional.IsDefined(Timeout)) + { + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout.Value, "P"); + } + else + { + writer.WriteNull("timeout"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningJobLimits DeserializeMachineLearningJobLimits(JsonElement element) + { + if (element.TryGetProperty("jobLimitsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Sweep": return MachineLearningSweepJobLimits.DeserializeMachineLearningSweepJobLimits(element); + case "Command": return MachineLearningCommandJobLimits.DeserializeMachineLearningCommandJobLimits(element); + } + } + return UnknownJobLimits.DeserializeUnknownJobLimits(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobLimits.cs new file mode 100644 index 000000000000..7f314b0b01d4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobLimits.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningJobLimits. + /// Serialized Name: JobLimits + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningJobLimits + { + /// Initializes a new instance of MachineLearningJobLimits. + protected MachineLearningJobLimits() + { + } + + /// Initializes a new instance of MachineLearningJobLimits. + /// + /// [Required] JobLimit type. + /// Serialized Name: JobLimits.jobLimitsType + /// + /// + /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. + /// Serialized Name: JobLimits.timeout + /// + internal MachineLearningJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout) + { + JobLimitsType = jobLimitsType; + Timeout = timeout; + } + + /// + /// [Required] JobLimit type. + /// Serialized Name: JobLimits.jobLimitsType + /// + internal JobLimitsType JobLimitsType { get; set; } + /// + /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. + /// Serialized Name: JobLimits.timeout + /// + public TimeSpan? Timeout { 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 new file mode 100644 index 000000000000..1406cfcb6059 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningJobOutput DeserializeMachineLearningJobOutput(JsonElement element) + { + if (element.TryGetProperty("jobOutputType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "custom_model": return MachineLearningCustomModelJobOutput.DeserializeMachineLearningCustomModelJobOutput(element); + case "mlflow_model": return MachineLearningFlowModelJobOutput.DeserializeMachineLearningFlowModelJobOutput(element); + case "mltable": return MachineLearningTableJobOutput.DeserializeMachineLearningTableJobOutput(element); + case "triton_model": return MachineLearningTritonModelJobOutput.DeserializeMachineLearningTritonModelJobOutput(element); + case "uri_file": return MachineLearningUriFileJobOutput.DeserializeMachineLearningUriFileJobOutput(element); + case "uri_folder": return MachineLearningUriFolderJobOutput.DeserializeMachineLearningUriFolderJobOutput(element); + } + } + return UnknownJobOutput.DeserializeUnknownJobOutput(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs new file mode 100644 index 000000000000..f59bb98954fa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobOutput.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Job output definition container information on where to find job output/logs. + /// Serialized Name: JobOutput + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningJobOutput. + protected MachineLearningJobOutput() + { + } + + /// Initializes a new instance of MachineLearningJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + internal MachineLearningJobOutput(string description, JobOutputType jobOutputType) + { + Description = description; + JobOutputType = jobOutputType; + } + + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + public string Description { get; set; } + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + internal JobOutputType JobOutputType { 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 495cffff20a1..eee8cbe5f7df 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 @@ -152,20 +152,20 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper switch (discriminator.GetString()) { case "AutoML": return AutoMLJob.DeserializeAutoMLJob(element); - case "Command": return CommandJob.DeserializeCommandJob(element); - case "Pipeline": return PipelineJob.DeserializePipelineJob(element); - case "Sweep": return SweepJob.DeserializeSweepJob(element); + case "Command": return MachineLearningCommandJob.DeserializeMachineLearningCommandJob(element); + case "Pipeline": return MachineLearningPipelineJob.DeserializeMachineLearningPipelineJob(element); + case "Sweep": return MachineLearningSweepJob.DeserializeMachineLearningSweepJob(element); } } Optional componentId = default; Optional computeId = default; Optional displayName = default; Optional experimentName = default; - Optional identity = default; + Optional identity = default; Optional isArchived = default; JobType jobType = default; - Optional> services = default; - Optional status = default; + Optional> services = default; + Optional status = default; Optional description = default; Optional> properties = default; Optional> tags = default; @@ -213,7 +213,7 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper identity = null; continue; } - identity = IdentityConfiguration.DeserializeIdentityConfiguration(property.Value); + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); continue; } if (property.NameEquals("isArchived")) @@ -238,7 +238,7 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper services = null; continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -247,7 +247,7 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper } else { - dictionary.Add(property0.Name, JobService.DeserializeJobService(property0.Value)); + dictionary.Add(property0.Name, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); } } services = dictionary; @@ -260,7 +260,7 @@ internal static MachineLearningJobProperties DeserializeMachineLearningJobProper property.ThrowNonNullablePropertyIsNull(); continue; } - status = new JobStatus(property.Value.GetString()); + status = new MachineLearningJobStatus(property.Value.GetString()); continue; } if (property.NameEquals("description")) 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 473f6b777a66..e91634876252 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobProperties.cs @@ -12,39 +12,72 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// /// Base definition for a job. + /// Serialized Name: JobBase /// Please note is the base class. According to the scenario, a derived class 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 : ResourceBase + public partial class MachineLearningJobProperties : MachineLearningResourceBase { /// Initializes a new instance of MachineLearningJobProperties. public MachineLearningJobProperties() { - Services = new ChangeTrackingDictionary(); + Services = new ChangeTrackingDictionary(); } /// Initializes a new instance of MachineLearningJobProperties. - /// 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. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// ARM resource ID of the component resource. + /// Serialized Name: JobBase.componentId + /// + /// + /// ARM resource ID of the compute resource. + /// Serialized Name: JobBase.computeId + /// + /// + /// Display name of job. + /// Serialized Name: JobBase.displayName + /// + /// + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Serialized Name: JobBase.experimentName + /// /// /// 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 . + /// Serialized Name: JobBase.identity + /// Please note is the base class. According to the scenario, a derived class 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? + /// Serialized Name: JobBase.isArchived + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobBase.jobType /// - /// Is the asset archived?. - /// [Required] Specifies the type of job. /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// Serialized Name: JobBase.services /// - /// Status of the job. - internal MachineLearningJobProperties(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, IdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, JobStatus? status) : base(description, properties, tags) + /// + /// Status of the job. + /// Serialized Name: JobBase.status + /// + internal MachineLearningJobProperties(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status) : base(description, properties, tags) { ComponentId = componentId; ComputeId = computeId; @@ -57,31 +90,54 @@ internal MachineLearningJobProperties(string description, IDictionary ARM resource ID of the component resource. + /// + /// ARM resource ID of the component resource. + /// Serialized Name: JobBase.componentId + /// public string ComponentId { get; set; } - /// ARM resource ID of the compute resource. + /// + /// ARM resource ID of the compute resource. + /// Serialized Name: JobBase.computeId + /// public string ComputeId { get; set; } - /// Display name of job. + /// + /// Display name of job. + /// Serialized Name: JobBase.displayName + /// public string DisplayName { get; set; } - /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Serialized Name: JobBase.experimentName + /// public string ExperimentName { 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 . + /// Serialized Name: JobBase.identity + /// Please note is the base class. According to the scenario, a derived class 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? + /// Serialized Name: JobBase.isArchived /// - public IdentityConfiguration Identity { get; set; } - /// Is the asset archived?. public bool? IsArchived { get; set; } - /// [Required] Specifies the type of job. + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobBase.jobType + /// internal JobType JobType { get; set; } /// /// List of JobEndpoints. /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// Serialized Name: JobBase.services + /// + public IDictionary Services { get; set; } + /// + /// Status of the job. + /// Serialized Name: JobBase.status /// - public IDictionary Services { get; set; } - /// Status of the job. - public JobStatus? Status { get; } + 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 new file mode 100644 index 000000000000..ba483598c4fa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.Serialization.cs @@ -0,0 +1,142 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobResourceConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(DockerArgs)) + { + if (DockerArgs != null) + { + writer.WritePropertyName("dockerArgs"); + writer.WriteStringValue(DockerArgs); + } + else + { + writer.WriteNull("dockerArgs"); + } + } + if (Optional.IsDefined(ShmSize)) + { + writer.WritePropertyName("shmSize"); + writer.WriteStringValue(ShmSize); + } + if (Optional.IsDefined(InstanceCount)) + { + writer.WritePropertyName("instanceCount"); + writer.WriteNumberValue(InstanceCount.Value); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningJobResourceConfiguration DeserializeMachineLearningJobResourceConfiguration(JsonElement element) + { + Optional dockerArgs = default; + Optional shmSize = default; + Optional instanceCount = default; + Optional instanceType = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dockerArgs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + dockerArgs = null; + continue; + } + dockerArgs = property.Value.GetString(); + continue; + } + if (property.NameEquals("shmSize")) + { + shmSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + properties = dictionary; + continue; + } + } + return new MachineLearningJobResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties), dockerArgs.Value, shmSize.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs new file mode 100644 index 000000000000..ad9ff6ebc44d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobResourceConfiguration.cs @@ -0,0 +1,62 @@ +// 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 MachineLearningJobResourceConfiguration. + /// Serialized Name: JobResourceConfiguration + /// + public partial class MachineLearningJobResourceConfiguration : MachineLearningResourceConfiguration + { + /// Initializes a new instance of MachineLearningJobResourceConfiguration. + public MachineLearningJobResourceConfiguration() + { + } + + /// Initializes a new instance of MachineLearningJobResourceConfiguration. + /// + /// Optional number of instances or nodes used by the compute target. + /// Serialized Name: ResourceConfiguration.instanceCount + /// + /// + /// Optional type of VM used as supported by the compute target. + /// Serialized Name: ResourceConfiguration.instanceType + /// + /// + /// Additional properties bag. + /// Serialized Name: ResourceConfiguration.properties + /// + /// + /// 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. + /// Serialized Name: JobResourceConfiguration.dockerArgs + /// + /// + /// 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). + /// Serialized Name: JobResourceConfiguration.shmSize + /// + internal MachineLearningJobResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties, string dockerArgs, string shmSize) : base(instanceCount, instanceType, properties) + { + DockerArgs = dockerArgs; + ShmSize = shmSize; + } + + /// + /// 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. + /// Serialized Name: JobResourceConfiguration.dockerArgs + /// + 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). + /// Serialized Name: JobResourceConfiguration.shmSize + /// + public string ShmSize { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.Serialization.cs new file mode 100644 index 000000000000..45fae2e6189c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobScheduleAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("jobDefinition"); + writer.WriteObjectValue(JobDefinition); + writer.WritePropertyName("actionType"); + writer.WriteStringValue(ActionType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningJobScheduleAction DeserializeMachineLearningJobScheduleAction(JsonElement element) + { + MachineLearningJobProperties jobDefinition = default; + ScheduleActionType actionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobDefinition")) + { + jobDefinition = MachineLearningJobProperties.DeserializeMachineLearningJobProperties(property.Value); + continue; + } + if (property.NameEquals("actionType")) + { + actionType = new ScheduleActionType(property.Value.GetString()); + continue; + } + } + return new MachineLearningJobScheduleAction(actionType, jobDefinition); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs new file mode 100644 index 000000000000..bc65ea0050b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobScheduleAction.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningJobScheduleAction. + /// Serialized Name: JobScheduleAction + /// + public partial class MachineLearningJobScheduleAction : MachineLearningScheduleAction + { + /// Initializes a new instance of MachineLearningJobScheduleAction. + /// + /// [Required] Defines Schedule action definition details. + /// Serialized Name: JobScheduleAction.jobDefinition + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningJobScheduleAction(MachineLearningJobProperties jobDefinition) + { + Argument.AssertNotNull(jobDefinition, nameof(jobDefinition)); + + JobDefinition = jobDefinition; + ActionType = ScheduleActionType.CreateJob; + } + + /// Initializes a new instance of MachineLearningJobScheduleAction. + /// + /// [Required] Specifies the action type of the schedule + /// Serialized Name: ScheduleActionBase.actionType + /// + /// + /// [Required] Defines Schedule action definition details. + /// Serialized Name: JobScheduleAction.jobDefinition + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningJobScheduleAction(ScheduleActionType actionType, MachineLearningJobProperties jobDefinition) : base(actionType) + { + JobDefinition = jobDefinition; + ActionType = actionType; + } + + /// + /// [Required] Defines Schedule action definition details. + /// Serialized Name: JobScheduleAction.jobDefinition + /// Please note is the base class. According to the scenario, a derived class 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 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 new file mode 100644 index 000000000000..5cdd7754ec32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.Serialization.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningJobService : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Endpoint)) + { + if (Endpoint != null) + { + writer.WritePropertyName("endpoint"); + writer.WriteStringValue(Endpoint); + } + else + { + writer.WriteNull("endpoint"); + } + } + if (Optional.IsDefined(JobServiceType)) + { + if (JobServiceType != null) + { + writer.WritePropertyName("jobServiceType"); + writer.WriteStringValue(JobServiceType); + } + else + { + writer.WriteNull("jobServiceType"); + } + } + if (Optional.IsDefined(Port)) + { + if (Port != null) + { + writer.WritePropertyName("port"); + writer.WriteNumberValue(Port.Value); + } + else + { + writer.WriteNull("port"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningJobService DeserializeMachineLearningJobService(JsonElement element) + { + Optional endpoint = default; + Optional errorMessage = default; + Optional jobServiceType = default; + Optional port = default; + Optional> properties = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpoint")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endpoint = null; + continue; + } + endpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("errorMessage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + errorMessage = null; + continue; + } + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobServiceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jobServiceType = null; + continue; + } + jobServiceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("port")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + port = null; + continue; + } + port = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + status = null; + continue; + } + status = property.Value.GetString(); + continue; + } + } + return new MachineLearningJobService(endpoint.Value, errorMessage.Value, jobServiceType.Value, Optional.ToNullable(port), Optional.ToDictionary(properties), status.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs new file mode 100644 index 000000000000..8211560cc0ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobService.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Job endpoint definition + /// Serialized Name: JobService + /// + public partial class MachineLearningJobService + { + /// Initializes a new instance of MachineLearningJobService. + public MachineLearningJobService() + { + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningJobService. + /// + /// Url for endpoint. + /// Serialized Name: JobService.endpoint + /// + /// + /// Any error in the service. + /// Serialized Name: JobService.errorMessage + /// + /// + /// Endpoint type. + /// Serialized Name: JobService.jobServiceType + /// + /// + /// Port for endpoint. + /// Serialized Name: JobService.port + /// + /// + /// Additional properties to set on the endpoint. + /// Serialized Name: JobService.properties + /// + /// + /// Status of endpoint. + /// Serialized Name: JobService.status + /// + internal MachineLearningJobService(string endpoint, string errorMessage, string jobServiceType, int? port, IDictionary properties, string status) + { + Endpoint = endpoint; + ErrorMessage = errorMessage; + JobServiceType = jobServiceType; + Port = port; + Properties = properties; + Status = status; + } + + /// + /// Url for endpoint. + /// Serialized Name: JobService.endpoint + /// + public string Endpoint { get; set; } + /// + /// Any error in the service. + /// Serialized Name: JobService.errorMessage + /// + public string ErrorMessage { get; } + /// + /// Endpoint type. + /// Serialized Name: JobService.jobServiceType + /// + public string JobServiceType { get; set; } + /// + /// Port for endpoint. + /// Serialized Name: JobService.port + /// + public int? Port { get; set; } + /// + /// Additional properties to set on the endpoint. + /// Serialized Name: JobService.properties + /// + public IDictionary Properties { get; set; } + /// + /// Status of endpoint. + /// Serialized Name: JobService.status + /// + public string Status { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs new file mode 100644 index 000000000000..3996af3b0fdf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningJobStatus.cs @@ -0,0 +1,133 @@ +// 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 status of a job. + /// Serialized Name: JobStatus + /// + public readonly partial struct MachineLearningJobStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningJobStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotStartedValue = "NotStarted"; + private const string StartingValue = "Starting"; + private const string ProvisioningValue = "Provisioning"; + private const string PreparingValue = "Preparing"; + private const string QueuedValue = "Queued"; + private const string RunningValue = "Running"; + private const string FinalizingValue = "Finalizing"; + private const string CancelRequestedValue = "CancelRequested"; + private const string CompletedValue = "Completed"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + private const string NotRespondingValue = "NotResponding"; + private const string PausedValue = "Paused"; + private const string UnknownValue = "Unknown"; + + /// + /// Run hasn't started yet. + /// Serialized Name: JobStatus.NotStarted + /// + public static MachineLearningJobStatus NotStarted { get; } = new MachineLearningJobStatus(NotStartedValue); + /// + /// Run has started. The user has a run ID. + /// Serialized Name: JobStatus.Starting + /// + public static MachineLearningJobStatus Starting { get; } = new MachineLearningJobStatus(StartingValue); + /// + /// (Not used currently) It will be used if ES is creating the compute target. + /// Serialized Name: JobStatus.Provisioning + /// + public static MachineLearningJobStatus Provisioning { get; } = new MachineLearningJobStatus(ProvisioningValue); + /// + /// The run environment is being prepared. + /// Serialized Name: JobStatus.Preparing + /// + public static MachineLearningJobStatus Preparing { get; } = new MachineLearningJobStatus(PreparingValue); + /// + /// The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready. + /// Serialized Name: JobStatus.Queued + /// + public static MachineLearningJobStatus Queued { get; } = new MachineLearningJobStatus(QueuedValue); + /// + /// The job started to run in the compute target. + /// Serialized Name: JobStatus.Running + /// + public static MachineLearningJobStatus Running { get; } = new MachineLearningJobStatus(RunningValue); + /// + /// Job is completed in the target. It is in output collection state now. + /// Serialized Name: JobStatus.Finalizing + /// + public static MachineLearningJobStatus Finalizing { get; } = new MachineLearningJobStatus(FinalizingValue); + /// + /// Cancellation has been requested for the job. + /// Serialized Name: JobStatus.CancelRequested + /// + public static MachineLearningJobStatus CancelRequested { get; } = new MachineLearningJobStatus(CancelRequestedValue); + /// + /// Job completed successfully. This reflects that both the job itself and output collection states completed successfully + /// Serialized Name: JobStatus.Completed + /// + public static MachineLearningJobStatus Completed { get; } = new MachineLearningJobStatus(CompletedValue); + /// + /// Job failed. + /// Serialized Name: JobStatus.Failed + /// + public static MachineLearningJobStatus Failed { get; } = new MachineLearningJobStatus(FailedValue); + /// + /// Following cancellation request, the job is now successfully canceled. + /// Serialized Name: JobStatus.Canceled + /// + public static MachineLearningJobStatus Canceled { get; } = new MachineLearningJobStatus(CanceledValue); + /// + /// When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. + /// NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. + /// Serialized Name: JobStatus.NotResponding + /// + public static MachineLearningJobStatus NotResponding { get; } = new MachineLearningJobStatus(NotRespondingValue); + /// + /// The job is paused by users. Some adjustment to labeling jobs can be made only in paused state. + /// Serialized Name: JobStatus.Paused + /// + public static MachineLearningJobStatus Paused { get; } = new MachineLearningJobStatus(PausedValue); + /// + /// Default job status if not mapped to all other statuses + /// Serialized Name: JobStatus.Unknown + /// + public static MachineLearningJobStatus Unknown { get; } = new MachineLearningJobStatus(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningJobStatus left, MachineLearningJobStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningJobStatus left, MachineLearningJobStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningJobStatus(string value) => new MachineLearningJobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningJobStatus other && Equals(other); + /// + public bool Equals(MachineLearningJobStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKeyType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKeyType.cs new file mode 100644 index 000000000000..fabafcf0e823 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKeyType.cs @@ -0,0 +1,60 @@ +// 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 MachineLearningKeyType. + /// Serialized Name: KeyType + /// + public readonly partial struct MachineLearningKeyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningKeyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PrimaryValue = "Primary"; + private const string SecondaryValue = "Secondary"; + + /// + /// Primary + /// Serialized Name: KeyType.Primary + /// + public static MachineLearningKeyType Primary { get; } = new MachineLearningKeyType(PrimaryValue); + /// + /// Secondary + /// Serialized Name: KeyType.Secondary + /// + public static MachineLearningKeyType Secondary { get; } = new MachineLearningKeyType(SecondaryValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningKeyType left, MachineLearningKeyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningKeyType left, MachineLearningKeyType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningKeyType(string value) => new MachineLearningKeyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningKeyType other && Equals(other); + /// + public bool Equals(MachineLearningKeyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesCompute.Serialization.cs new file mode 100644 index 000000000000..ffb51ad84d64 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesCompute.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningKubernetesCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningKubernetesCompute DeserializeMachineLearningKubernetesCompute(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningKubernetesProperties.DeserializeMachineLearningKubernetesProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningKubernetesCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesCompute.cs new file mode 100644 index 000000000000..5008cb6069ca --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesCompute.cs @@ -0,0 +1,83 @@ +// 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 +{ + /// + /// A Machine Learning compute based on Kubernetes Compute. + /// Serialized Name: Kubernetes + /// + public partial class MachineLearningKubernetesCompute : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningKubernetesCompute. + public MachineLearningKubernetesCompute() + { + ComputeType = ComputeType.Kubernetes; + } + + /// Initializes a new instance of MachineLearningKubernetesCompute. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// + /// Properties of Kubernetes + /// Serialized Name: KubernetesSchema.properties + /// + internal MachineLearningKubernetesCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningKubernetesProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// + /// Properties of Kubernetes + /// Serialized Name: KubernetesSchema.properties + /// + public MachineLearningKubernetesProperties Properties { get; set; } + } +} 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 new file mode 100644 index 000000000000..90b6913ba092 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.Serialization.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningKubernetesOnlineDeployment : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ContainerResourceRequirements)) + { + if (ContainerResourceRequirements != null) + { + writer.WritePropertyName("containerResourceRequirements"); + writer.WriteObjectValue(ContainerResourceRequirements); + } + else + { + writer.WriteNull("containerResourceRequirements"); + } + } + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(EgressPublicNetworkAccess)) + { + writer.WritePropertyName("egressPublicNetworkAccess"); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + writer.WritePropertyName("endpointComputeType"); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsDefined(LivenessProbe)) + { + if (LivenessProbe != null) + { + writer.WritePropertyName("livenessProbe"); + writer.WriteObjectValue(LivenessProbe); + } + else + { + writer.WriteNull("livenessProbe"); + } + } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"); + writer.WriteStringValue(Model); + } + else + { + writer.WriteNull("model"); + } + } + if (Optional.IsDefined(ModelMountPath)) + { + if (ModelMountPath != null) + { + writer.WritePropertyName("modelMountPath"); + writer.WriteStringValue(ModelMountPath); + } + else + { + writer.WriteNull("modelMountPath"); + } + } + if (Optional.IsDefined(ReadinessProbe)) + { + if (ReadinessProbe != null) + { + writer.WritePropertyName("readinessProbe"); + writer.WriteObjectValue(ReadinessProbe); + } + else + { + writer.WriteNull("readinessProbe"); + } + } + if (Optional.IsDefined(RequestSettings)) + { + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"); + writer.WriteObjectValue(RequestSettings); + } + else + { + writer.WriteNull("requestSettings"); + } + } + if (Optional.IsDefined(ScaleSettings)) + { + if (ScaleSettings != null) + { + writer.WritePropertyName("scaleSettings"); + writer.WriteObjectValue(ScaleSettings); + } + else + { + writer.WriteNull("scaleSettings"); + } + } + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(EnvironmentId)) + { + if (EnvironmentId != null) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + else + { + writer.WriteNull("environmentId"); + } + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningKubernetesOnlineDeployment DeserializeMachineLearningKubernetesOnlineDeployment(JsonElement element) + { + Optional containerResourceRequirements = default; + Optional appInsightsEnabled = default; + Optional egressPublicNetworkAccess = default; + MachineLearningEndpointComputeType endpointComputeType = default; + Optional instanceType = default; + Optional livenessProbe = default; + Optional model = default; + Optional modelMountPath = default; + Optional provisioningState = default; + Optional readinessProbe = default; + Optional requestSettings = default; + Optional scaleSettings = default; + Optional codeConfiguration = default; + Optional description = default; + Optional environmentId = default; + Optional> environmentVariables = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerResourceRequirements")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + containerResourceRequirements = null; + continue; + } + containerResourceRequirements = MachineLearningContainerResourceRequirements.DeserializeMachineLearningContainerResourceRequirements(property.Value); + continue; + } + if (property.NameEquals("appInsightsEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("egressPublicNetworkAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointComputeType")) + { + endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("livenessProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + livenessProbe = null; + continue; + } + livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value); + continue; + } + if (property.NameEquals("model")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelMountPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelMountPath = null; + continue; + } + modelMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("readinessProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + readinessProbe = null; + continue; + } + readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value); + continue; + } + if (property.NameEquals("requestSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + requestSettings = null; + continue; + } + requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value); + continue; + } + if (property.NameEquals("scaleSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scaleSettings = null; + continue; + } + scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value); + continue; + } + if (property.NameEquals("codeConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentId = null; + continue; + } + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = 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, property0.Value.GetString()); + } + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + } + return new MachineLearningKubernetesOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value, containerResourceRequirements.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs new file mode 100644 index 000000000000..2927fa426305 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesOnlineDeployment.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Properties specific to a KubernetesOnlineDeployment. + /// Serialized Name: KubernetesOnlineDeployment + /// + public partial class MachineLearningKubernetesOnlineDeployment : MachineLearningOnlineDeploymentProperties + { + /// Initializes a new instance of MachineLearningKubernetesOnlineDeployment. + public MachineLearningKubernetesOnlineDeployment() + { + EndpointComputeType = MachineLearningEndpointComputeType.Kubernetes; + } + + /// Initializes a new instance of MachineLearningKubernetesOnlineDeployment. + /// + /// Code configuration for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.codeConfiguration + /// + /// + /// Description of the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.description + /// + /// + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentId + /// + /// + /// Environment variables configuration for the deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentVariables + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointDeploymentPropertiesBase.properties + /// + /// + /// If true, enables Application Insights logging. + /// Serialized Name: OnlineDeployment.appInsightsEnabled + /// + /// + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// Serialized Name: OnlineDeployment.egressPublicNetworkAccess + /// + /// + /// [Required] The compute type of the endpoint. + /// Serialized Name: OnlineDeployment.endpointComputeType + /// + /// + /// Compute instance type. + /// Serialized Name: OnlineDeployment.instanceType + /// + /// + /// Liveness probe monitors the health of the container regularly. + /// Serialized Name: OnlineDeployment.livenessProbe + /// + /// + /// The URI path to the model. + /// Serialized Name: OnlineDeployment.model + /// + /// + /// The path to mount the model in custom container. + /// Serialized Name: OnlineDeployment.modelMountPath + /// + /// + /// Provisioning state for the endpoint deployment. + /// Serialized Name: OnlineDeployment.provisioningState + /// + /// + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Serialized Name: OnlineDeployment.readinessProbe + /// + /// + /// Request settings for the deployment. + /// Serialized Name: OnlineDeployment.requestSettings + /// + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Serialized Name: OnlineDeployment.scaleSettings + /// Please note is the base class. According to the scenario, a derived class 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). + /// Serialized Name: KubernetesOnlineDeployment.containerResourceRequirements + /// + internal MachineLearningKubernetesOnlineDeployment(MachineLearningCodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, 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, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + { + ContainerResourceRequirements = containerResourceRequirements; + EndpointComputeType = endpointComputeType; + } + + /// + /// The resource requirements for the container (cpu and memory). + /// Serialized Name: KubernetesOnlineDeployment.containerResourceRequirements + /// + public MachineLearningContainerResourceRequirements ContainerResourceRequirements { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesProperties.Serialization.cs new file mode 100644 index 000000000000..89a374d896e4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesProperties.Serialization.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningKubernetesProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(RelayConnectionString)) + { + if (RelayConnectionString != null) + { + writer.WritePropertyName("relayConnectionString"); + writer.WriteStringValue(RelayConnectionString); + } + else + { + writer.WriteNull("relayConnectionString"); + } + } + if (Optional.IsDefined(ServiceBusConnectionString)) + { + if (ServiceBusConnectionString != null) + { + writer.WritePropertyName("serviceBusConnectionString"); + writer.WriteStringValue(ServiceBusConnectionString); + } + else + { + writer.WriteNull("serviceBusConnectionString"); + } + } + if (Optional.IsDefined(ExtensionPrincipalId)) + { + if (ExtensionPrincipalId != null) + { + writer.WritePropertyName("extensionPrincipalId"); + writer.WriteStringValue(ExtensionPrincipalId); + } + else + { + writer.WriteNull("extensionPrincipalId"); + } + } + if (Optional.IsDefined(ExtensionInstanceReleaseTrain)) + { + writer.WritePropertyName("extensionInstanceReleaseTrain"); + writer.WriteStringValue(ExtensionInstanceReleaseTrain); + } + if (Optional.IsDefined(VcName)) + { + writer.WritePropertyName("vcName"); + writer.WriteStringValue(VcName); + } + if (Optional.IsDefined(Namespace)) + { + writer.WritePropertyName("namespace"); + writer.WriteStringValue(Namespace); + } + if (Optional.IsDefined(DefaultInstanceType)) + { + writer.WritePropertyName("defaultInstanceType"); + writer.WriteStringValue(DefaultInstanceType); + } + if (Optional.IsCollectionDefined(InstanceTypes)) + { + writer.WritePropertyName("instanceTypes"); + writer.WriteStartObject(); + foreach (var item in InstanceTypes) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static MachineLearningKubernetesProperties DeserializeMachineLearningKubernetesProperties(JsonElement element) + { + Optional relayConnectionString = default; + Optional serviceBusConnectionString = default; + Optional extensionPrincipalId = default; + Optional extensionInstanceReleaseTrain = default; + Optional vcName = default; + Optional @namespace = default; + Optional defaultInstanceType = default; + Optional> instanceTypes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("relayConnectionString")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + relayConnectionString = null; + continue; + } + relayConnectionString = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceBusConnectionString")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + serviceBusConnectionString = null; + continue; + } + serviceBusConnectionString = property.Value.GetString(); + continue; + } + if (property.NameEquals("extensionPrincipalId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + extensionPrincipalId = null; + continue; + } + extensionPrincipalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("extensionInstanceReleaseTrain")) + { + extensionInstanceReleaseTrain = property.Value.GetString(); + continue; + } + if (property.NameEquals("vcName")) + { + vcName = property.Value.GetString(); + continue; + } + if (property.NameEquals("namespace")) + { + @namespace = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultInstanceType")) + { + defaultInstanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceTypes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, MachineLearningInstanceTypeSchema.DeserializeMachineLearningInstanceTypeSchema(property0.Value)); + } + instanceTypes = dictionary; + continue; + } + } + return new MachineLearningKubernetesProperties(relayConnectionString.Value, serviceBusConnectionString.Value, extensionPrincipalId.Value, extensionInstanceReleaseTrain.Value, vcName.Value, @namespace.Value, defaultInstanceType.Value, Optional.ToDictionary(instanceTypes)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesProperties.cs new file mode 100644 index 000000000000..387a1b06da90 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningKubernetesProperties.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Kubernetes properties + /// Serialized Name: KubernetesProperties + /// + public partial class MachineLearningKubernetesProperties + { + /// Initializes a new instance of MachineLearningKubernetesProperties. + public MachineLearningKubernetesProperties() + { + InstanceTypes = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningKubernetesProperties. + /// + /// Relay connection string. + /// Serialized Name: KubernetesProperties.relayConnectionString + /// + /// + /// ServiceBus connection string. + /// Serialized Name: KubernetesProperties.serviceBusConnectionString + /// + /// + /// Extension principal-id. + /// Serialized Name: KubernetesProperties.extensionPrincipalId + /// + /// + /// Extension instance release train. + /// Serialized Name: KubernetesProperties.extensionInstanceReleaseTrain + /// + /// + /// VC name. + /// Serialized Name: KubernetesProperties.vcName + /// + /// + /// Compute namespace + /// Serialized Name: KubernetesProperties.namespace + /// + /// + /// Default instance type + /// Serialized Name: KubernetesProperties.defaultInstanceType + /// + /// + /// Instance Type Schema + /// Serialized Name: KubernetesProperties.instanceTypes + /// + internal MachineLearningKubernetesProperties(string relayConnectionString, string serviceBusConnectionString, string extensionPrincipalId, string extensionInstanceReleaseTrain, string vcName, string @namespace, string defaultInstanceType, IDictionary instanceTypes) + { + RelayConnectionString = relayConnectionString; + ServiceBusConnectionString = serviceBusConnectionString; + ExtensionPrincipalId = extensionPrincipalId; + ExtensionInstanceReleaseTrain = extensionInstanceReleaseTrain; + VcName = vcName; + Namespace = @namespace; + DefaultInstanceType = defaultInstanceType; + InstanceTypes = instanceTypes; + } + + /// + /// Relay connection string. + /// Serialized Name: KubernetesProperties.relayConnectionString + /// + public string RelayConnectionString { get; set; } + /// + /// ServiceBus connection string. + /// Serialized Name: KubernetesProperties.serviceBusConnectionString + /// + public string ServiceBusConnectionString { get; set; } + /// + /// Extension principal-id. + /// Serialized Name: KubernetesProperties.extensionPrincipalId + /// + public string ExtensionPrincipalId { get; set; } + /// + /// Extension instance release train. + /// Serialized Name: KubernetesProperties.extensionInstanceReleaseTrain + /// + public string ExtensionInstanceReleaseTrain { get; set; } + /// + /// VC name. + /// Serialized Name: KubernetesProperties.vcName + /// + public string VcName { get; set; } + /// + /// Compute namespace + /// Serialized Name: KubernetesProperties.namespace + /// + public string Namespace { get; set; } + /// + /// Default instance type + /// Serialized Name: KubernetesProperties.defaultInstanceType + /// + public string DefaultInstanceType { get; set; } + /// + /// Instance Type Schema + /// Serialized Name: KubernetesProperties.instanceTypes + /// + public IDictionary InstanceTypes { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningListViewType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningListViewType.cs new file mode 100644 index 000000000000..7cda666e6c72 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningListViewType.cs @@ -0,0 +1,66 @@ +// 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 MachineLearningListViewType. + /// Serialized Name: ListViewType + /// + public readonly partial struct MachineLearningListViewType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningListViewType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveOnlyValue = "ActiveOnly"; + private const string ArchivedOnlyValue = "ArchivedOnly"; + private const string AllValue = "All"; + + /// + /// ActiveOnly + /// Serialized Name: ListViewType.ActiveOnly + /// + public static MachineLearningListViewType ActiveOnly { get; } = new MachineLearningListViewType(ActiveOnlyValue); + /// + /// ArchivedOnly + /// Serialized Name: ListViewType.ArchivedOnly + /// + public static MachineLearningListViewType ArchivedOnly { get; } = new MachineLearningListViewType(ArchivedOnlyValue); + /// + /// All + /// Serialized Name: ListViewType.All + /// + public static MachineLearningListViewType All { get; } = new MachineLearningListViewType(AllValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningListViewType left, MachineLearningListViewType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningListViewType left, MachineLearningListViewType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningListViewType(string value) => new MachineLearningListViewType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningListViewType other && Equals(other); + /// + public bool Equals(MachineLearningListViewType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..b5e2251b2b53 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningLiteralJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningLiteralJobInput DeserializeMachineLearningLiteralJobInput(JsonElement element) + { + string value = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningLiteralJobInput(description.Value, jobInputType, value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs new file mode 100644 index 000000000000..674d375166fb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLiteralJobInput.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Literal input type. + /// Serialized Name: LiteralJobInput + /// + public partial class MachineLearningLiteralJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningLiteralJobInput. + /// + /// [Required] Literal value for the input. + /// Serialized Name: LiteralJobInput.value + /// + /// is null. + public MachineLearningLiteralJobInput(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value; + JobInputType = JobInputType.Literal; + } + + /// Initializes a new instance of MachineLearningLiteralJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// [Required] Literal value for the input. + /// Serialized Name: LiteralJobInput.value + /// + internal MachineLearningLiteralJobInput(string description, JobInputType jobInputType, string value) : base(description, jobInputType) + { + Value = value; + JobInputType = jobInputType; + } + + /// + /// [Required] Literal value for the input. + /// Serialized Name: LiteralJobInput.value + /// + public string Value { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLoadBalancerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLoadBalancerType.cs new file mode 100644 index 000000000000..53eef9209606 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLoadBalancerType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Load Balancer Type + /// Serialized Name: LoadBalancerType + /// + public readonly partial struct MachineLearningLoadBalancerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningLoadBalancerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PublicIPValue = "PublicIp"; + private const string InternalLoadBalancerValue = "InternalLoadBalancer"; + + /// + /// PublicIp + /// Serialized Name: LoadBalancerType.PublicIp + /// + public static MachineLearningLoadBalancerType PublicIP { get; } = new MachineLearningLoadBalancerType(PublicIPValue); + /// + /// InternalLoadBalancer + /// Serialized Name: LoadBalancerType.InternalLoadBalancer + /// + public static MachineLearningLoadBalancerType InternalLoadBalancer { get; } = new MachineLearningLoadBalancerType(InternalLoadBalancerValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningLoadBalancerType left, MachineLearningLoadBalancerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningLoadBalancerType left, MachineLearningLoadBalancerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningLoadBalancerType(string value) => new MachineLearningLoadBalancerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningLoadBalancerType other && Equals(other); + /// + public bool Equals(MachineLearningLoadBalancerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLogVerbosity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLogVerbosity.cs new file mode 100644 index 000000000000..5a898277b886 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningLogVerbosity.cs @@ -0,0 +1,84 @@ +// 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 for setting log verbosity. + /// Serialized Name: LogVerbosity + /// + public readonly partial struct MachineLearningLogVerbosity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningLogVerbosity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NotSetValue = "NotSet"; + private const string DebugValue = "Debug"; + private const string InfoValue = "Info"; + private const string WarningValue = "Warning"; + private const string ErrorValue = "Error"; + private const string CriticalValue = "Critical"; + + /// + /// No logs emitted. + /// Serialized Name: LogVerbosity.NotSet + /// + public static MachineLearningLogVerbosity NotSet { get; } = new MachineLearningLogVerbosity(NotSetValue); + /// + /// Debug and above log statements logged. + /// Serialized Name: LogVerbosity.Debug + /// + public static MachineLearningLogVerbosity Debug { get; } = new MachineLearningLogVerbosity(DebugValue); + /// + /// Info and above log statements logged. + /// Serialized Name: LogVerbosity.Info + /// + public static MachineLearningLogVerbosity Info { get; } = new MachineLearningLogVerbosity(InfoValue); + /// + /// Warning and above log statements logged. + /// Serialized Name: LogVerbosity.Warning + /// + public static MachineLearningLogVerbosity Warning { get; } = new MachineLearningLogVerbosity(WarningValue); + /// + /// Error and above log statements logged. + /// Serialized Name: LogVerbosity.Error + /// + public static MachineLearningLogVerbosity Error { get; } = new MachineLearningLogVerbosity(ErrorValue); + /// + /// Only critical statements logged. + /// Serialized Name: LogVerbosity.Critical + /// + public static MachineLearningLogVerbosity Critical { get; } = new MachineLearningLogVerbosity(CriticalValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningLogVerbosity left, MachineLearningLogVerbosity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningLogVerbosity left, MachineLearningLogVerbosity right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningLogVerbosity(string value) => new MachineLearningLogVerbosity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningLogVerbosity other && Equals(other); + /// + public bool Equals(MachineLearningLogVerbosity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentity.Serialization.cs new file mode 100644 index 000000000000..99a44baf1144 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentity.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningManagedIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClientId)) + { + if (ClientId != null) + { + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId.Value); + } + else + { + writer.WriteNull("clientId"); + } + } + if (Optional.IsDefined(ObjectId)) + { + if (ObjectId != null) + { + writer.WritePropertyName("objectId"); + writer.WriteStringValue(ObjectId.Value); + } + else + { + writer.WriteNull("objectId"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + writer.WritePropertyName("identityType"); + writer.WriteStringValue(IdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningManagedIdentity DeserializeMachineLearningManagedIdentity(JsonElement element) + { + Optional clientId = default; + Optional objectId = default; + Optional resourceId = default; + IdentityConfigurationType identityType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + clientId = null; + continue; + } + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("objectId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + objectId = null; + continue; + } + objectId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("identityType")) + { + identityType = new IdentityConfigurationType(property.Value.GetString()); + continue; + } + } + return new MachineLearningManagedIdentity(identityType, Optional.ToNullable(clientId), Optional.ToNullable(objectId), resourceId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentity.cs new file mode 100644 index 000000000000..c323eb8f066f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentity.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Managed identity configuration. + /// Serialized Name: ManagedIdentity + /// + public partial class MachineLearningManagedIdentity : MachineLearningIdentityConfiguration + { + /// Initializes a new instance of MachineLearningManagedIdentity. + public MachineLearningManagedIdentity() + { + IdentityType = IdentityConfigurationType.Managed; + } + + /// Initializes a new instance of MachineLearningManagedIdentity. + /// + /// [Required] Specifies the type of identity framework. + /// Serialized Name: IdentityConfiguration.identityType + /// + /// + /// Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. + /// Serialized Name: ManagedIdentity.clientId + /// + /// + /// Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. + /// Serialized Name: ManagedIdentity.objectId + /// + /// + /// Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. + /// Serialized Name: ManagedIdentity.resourceId + /// + internal MachineLearningManagedIdentity(IdentityConfigurationType identityType, Guid? clientId, Guid? objectId, ResourceIdentifier resourceId) : base(identityType) + { + ClientId = clientId; + ObjectId = objectId; + ResourceId = resourceId; + IdentityType = identityType; + } + + /// + /// Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. + /// Serialized Name: ManagedIdentity.clientId + /// + public Guid? ClientId { get; set; } + /// + /// Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. + /// Serialized Name: ManagedIdentity.objectId + /// + public Guid? ObjectId { get; set; } + /// + /// Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. + /// Serialized Name: ManagedIdentity.resourceId + /// + public ResourceIdentifier ResourceId { get; set; } + } +} 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 new file mode 100644 index 000000000000..1d0738d0f5a7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningManagedIdentityAuthTypeWorkspaceConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningManagedIdentityAuthTypeWorkspaceConnection DeserializeMachineLearningManagedIdentityAuthTypeWorkspaceConnection(JsonElement element) + { + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional target = default; + Optional value = default; + Optional valueFormat = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + credentials = MachineLearningWorkspaceConnectionManagedIdentity.DeserializeMachineLearningWorkspaceConnectionManagedIdentity(property.Value); + continue; + } + if (property.NameEquals("authType")) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueFormat")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + continue; + } + } + return new MachineLearningManagedIdentityAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs new file mode 100644 index 000000000000..50830c175084 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedIdentityAuthTypeWorkspaceConnection.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningManagedIdentityAuthTypeWorkspaceConnection. + /// Serialized Name: ManagedIdentityAuthTypeWorkspaceConnectionProperties + /// + public partial class MachineLearningManagedIdentityAuthTypeWorkspaceConnection : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of MachineLearningManagedIdentityAuthTypeWorkspaceConnection. + public MachineLearningManagedIdentityAuthTypeWorkspaceConnection() + { + AuthType = MachineLearningConnectionAuthType.ManagedIdentity; + } + + /// Initializes a new instance of MachineLearningManagedIdentityAuthTypeWorkspaceConnection. + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + /// Serialized Name: ManagedIdentityAuthTypeWorkspaceConnectionProperties.credentials. + internal MachineLearningManagedIdentityAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, MachineLearningWorkspaceConnectionManagedIdentity credentials) : base(authType, category, target, value, valueFormat) + { + Credentials = credentials; + AuthType = authType; + } + + /// Serialized Name: ManagedIdentityAuthTypeWorkspaceConnectionProperties.credentials. + public MachineLearningWorkspaceConnectionManagedIdentity Credentials { get; set; } + } +} 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 new file mode 100644 index 000000000000..eba37d30c8f2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.Serialization.cs @@ -0,0 +1,393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningManagedOnlineDeployment : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(EgressPublicNetworkAccess)) + { + writer.WritePropertyName("egressPublicNetworkAccess"); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + writer.WritePropertyName("endpointComputeType"); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsDefined(LivenessProbe)) + { + if (LivenessProbe != null) + { + writer.WritePropertyName("livenessProbe"); + writer.WriteObjectValue(LivenessProbe); + } + else + { + writer.WriteNull("livenessProbe"); + } + } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"); + writer.WriteStringValue(Model); + } + else + { + writer.WriteNull("model"); + } + } + if (Optional.IsDefined(ModelMountPath)) + { + if (ModelMountPath != null) + { + writer.WritePropertyName("modelMountPath"); + writer.WriteStringValue(ModelMountPath); + } + else + { + writer.WriteNull("modelMountPath"); + } + } + if (Optional.IsDefined(ReadinessProbe)) + { + if (ReadinessProbe != null) + { + writer.WritePropertyName("readinessProbe"); + writer.WriteObjectValue(ReadinessProbe); + } + else + { + writer.WriteNull("readinessProbe"); + } + } + if (Optional.IsDefined(RequestSettings)) + { + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"); + writer.WriteObjectValue(RequestSettings); + } + else + { + writer.WriteNull("requestSettings"); + } + } + if (Optional.IsDefined(ScaleSettings)) + { + if (ScaleSettings != null) + { + writer.WritePropertyName("scaleSettings"); + writer.WriteObjectValue(ScaleSettings); + } + else + { + writer.WriteNull("scaleSettings"); + } + } + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(EnvironmentId)) + { + if (EnvironmentId != null) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + else + { + writer.WriteNull("environmentId"); + } + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningManagedOnlineDeployment DeserializeMachineLearningManagedOnlineDeployment(JsonElement element) + { + Optional appInsightsEnabled = default; + Optional egressPublicNetworkAccess = default; + MachineLearningEndpointComputeType endpointComputeType = default; + Optional instanceType = default; + Optional livenessProbe = default; + Optional model = default; + Optional modelMountPath = default; + Optional provisioningState = default; + Optional readinessProbe = default; + Optional requestSettings = default; + Optional scaleSettings = default; + Optional codeConfiguration = default; + Optional description = default; + Optional environmentId = default; + Optional> environmentVariables = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appInsightsEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("egressPublicNetworkAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointComputeType")) + { + endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("livenessProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + livenessProbe = null; + continue; + } + livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value); + continue; + } + if (property.NameEquals("model")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelMountPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelMountPath = null; + continue; + } + modelMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("readinessProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + readinessProbe = null; + continue; + } + readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value); + continue; + } + if (property.NameEquals("requestSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + requestSettings = null; + continue; + } + requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value); + continue; + } + if (property.NameEquals("scaleSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scaleSettings = null; + continue; + } + scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value); + continue; + } + if (property.NameEquals("codeConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentId = null; + continue; + } + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = 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, property0.Value.GetString()); + } + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + } + return new MachineLearningManagedOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs new file mode 100644 index 000000000000..c87d5eeded17 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningManagedOnlineDeployment.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Properties specific to a ManagedOnlineDeployment. + /// Serialized Name: ManagedOnlineDeployment + /// + public partial class MachineLearningManagedOnlineDeployment : MachineLearningOnlineDeploymentProperties + { + /// Initializes a new instance of MachineLearningManagedOnlineDeployment. + public MachineLearningManagedOnlineDeployment() + { + EndpointComputeType = MachineLearningEndpointComputeType.Managed; + } + + /// Initializes a new instance of MachineLearningManagedOnlineDeployment. + /// + /// Code configuration for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.codeConfiguration + /// + /// + /// Description of the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.description + /// + /// + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentId + /// + /// + /// Environment variables configuration for the deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentVariables + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointDeploymentPropertiesBase.properties + /// + /// + /// If true, enables Application Insights logging. + /// Serialized Name: OnlineDeployment.appInsightsEnabled + /// + /// + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// Serialized Name: OnlineDeployment.egressPublicNetworkAccess + /// + /// + /// [Required] The compute type of the endpoint. + /// Serialized Name: OnlineDeployment.endpointComputeType + /// + /// + /// Compute instance type. + /// Serialized Name: OnlineDeployment.instanceType + /// + /// + /// Liveness probe monitors the health of the container regularly. + /// Serialized Name: OnlineDeployment.livenessProbe + /// + /// + /// The URI path to the model. + /// Serialized Name: OnlineDeployment.model + /// + /// + /// The path to mount the model in custom container. + /// Serialized Name: OnlineDeployment.modelMountPath + /// + /// + /// Provisioning state for the endpoint deployment. + /// Serialized Name: OnlineDeployment.provisioningState + /// + /// + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Serialized Name: OnlineDeployment.readinessProbe + /// + /// + /// Request settings for the deployment. + /// Serialized Name: OnlineDeployment.requestSettings + /// + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Serialized Name: OnlineDeployment.scaleSettings + /// Please note is the base class. According to the scenario, a derived class 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, bool? appInsightsEnabled, 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, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) + { + EndpointComputeType = endpointComputeType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerData.Serialization.cs new file mode 100644 index 000000000000..b5de1962d37a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningModelContainerData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningModelContainerData DeserializeMachineLearningModelContainerData(JsonElement element) + { + MachineLearningModelContainerProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningModelContainerProperties.DeserializeMachineLearningModelContainerProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningModelContainerData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..79b305674dd3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningModelContainerProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningModelContainerProperties DeserializeMachineLearningModelContainerProperties(JsonElement element) + { + Optional isArchived = default; + Optional latestVersion = default; + Optional nextVersion = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("latestVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + latestVersion = null; + continue; + } + latestVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextVersion")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + nextVersion = null; + continue; + } + nextVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningModelContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs new file mode 100644 index 000000000000..6856fa5a6f4f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelContainerProperties.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningModelContainerProperties. + /// Serialized Name: ModelContainer + /// + public partial class MachineLearningModelContainerProperties : MachineLearningAssetContainer + { + /// Initializes a new instance of MachineLearningModelContainerProperties. + public MachineLearningModelContainerProperties() + { + } + + /// Initializes a new instance of MachineLearningModelContainerProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetContainer.isArchived + /// + /// + /// The latest version inside this container. + /// Serialized Name: AssetContainer.latestVersion + /// + /// + /// The next auto incremental version + /// Serialized Name: AssetContainer.nextVersion + /// + internal MachineLearningModelContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) + { + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelSize.cs new file mode 100644 index 000000000000..f8ade30d86fc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelSize.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Image model size. + /// Serialized Name: ModelSize + /// + public readonly partial struct MachineLearningModelSize : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningModelSize(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SmallValue = "Small"; + private const string MediumValue = "Medium"; + private const string LargeValue = "Large"; + private const string ExtraLargeValue = "ExtraLarge"; + + /// + /// No value selected. + /// Serialized Name: ModelSize.None + /// + public static MachineLearningModelSize None { get; } = new MachineLearningModelSize(NoneValue); + /// + /// Small size. + /// Serialized Name: ModelSize.Small + /// + public static MachineLearningModelSize Small { get; } = new MachineLearningModelSize(SmallValue); + /// + /// Medium size. + /// Serialized Name: ModelSize.Medium + /// + public static MachineLearningModelSize Medium { get; } = new MachineLearningModelSize(MediumValue); + /// + /// Large size. + /// Serialized Name: ModelSize.Large + /// + public static MachineLearningModelSize Large { get; } = new MachineLearningModelSize(LargeValue); + /// + /// Extra large size. + /// Serialized Name: ModelSize.ExtraLarge + /// + public static MachineLearningModelSize ExtraLarge { get; } = new MachineLearningModelSize(ExtraLargeValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningModelSize left, MachineLearningModelSize right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningModelSize left, MachineLearningModelSize right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningModelSize(string value) => new MachineLearningModelSize(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningModelSize other && Equals(other); + /// + public bool Equals(MachineLearningModelSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionData.Serialization.cs new file mode 100644 index 000000000000..0528a7008470 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningModelVersionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningModelVersionData DeserializeMachineLearningModelVersionData(JsonElement element) + { + MachineLearningModelVersionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningModelVersionProperties.DeserializeMachineLearningModelVersionProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningModelVersionData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..5057775c2205 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.Serialization.cs @@ -0,0 +1,278 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningModelVersionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Flavors)) + { + if (Flavors != null) + { + writer.WritePropertyName("flavors"); + writer.WriteStartObject(); + foreach (var item in Flavors) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("flavors"); + } + } + if (Optional.IsDefined(JobName)) + { + if (JobName != null) + { + writer.WritePropertyName("jobName"); + writer.WriteStringValue(JobName); + } + else + { + writer.WriteNull("jobName"); + } + } + if (Optional.IsDefined(ModelType)) + { + if (ModelType != null) + { + writer.WritePropertyName("modelType"); + writer.WriteStringValue(ModelType); + } + else + { + writer.WriteNull("modelType"); + } + } + if (Optional.IsDefined(ModelUri)) + { + if (ModelUri != null) + { + writer.WritePropertyName("modelUri"); + writer.WriteStringValue(ModelUri.AbsoluteUri); + } + else + { + writer.WriteNull("modelUri"); + } + } + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningModelVersionProperties DeserializeMachineLearningModelVersionProperties(JsonElement element) + { + Optional> flavors = default; + Optional jobName = default; + Optional modelType = default; + Optional modelUri = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("flavors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + flavors = 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, MachineLearningFlavorData.DeserializeMachineLearningFlavorData(property0.Value)); + } + } + flavors = dictionary; + continue; + } + if (property.NameEquals("jobName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jobName = null; + continue; + } + jobName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelType = null; + continue; + } + modelType = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelUri = null; + continue; + } + modelUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningModelVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToDictionary(flavors), jobName.Value, modelType.Value, modelUri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs new file mode 100644 index 000000000000..c2cf0f3af0b3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningModelVersionProperties.cs @@ -0,0 +1,92 @@ +// 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 +{ + /// + /// Model asset version details. + /// Serialized Name: ModelVersion + /// + public partial class MachineLearningModelVersionProperties : MachineLearningAssetBase + { + /// Initializes a new instance of MachineLearningModelVersionProperties. + public MachineLearningModelVersionProperties() + { + Flavors = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningModelVersionProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// Mapping of model flavors to their properties. + /// Serialized Name: ModelVersion.flavors + /// + /// + /// Name of the training job which produced this model + /// Serialized Name: ModelVersion.jobName + /// + /// + /// The storage format for this entity. Used for NCD. + /// Serialized Name: ModelVersion.modelType + /// + /// + /// The URI path to the model contents. + /// Serialized Name: ModelVersion.modelUri + /// + internal MachineLearningModelVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, IDictionary flavors, string jobName, string modelType, Uri modelUri) : base(description, properties, tags, isAnonymous, isArchived) + { + Flavors = flavors; + JobName = jobName; + ModelType = modelType; + ModelUri = modelUri; + } + + /// + /// Mapping of model flavors to their properties. + /// Serialized Name: ModelVersion.flavors + /// + public IDictionary Flavors { get; set; } + /// + /// Name of the training job which produced this model + /// Serialized Name: ModelVersion.jobName + /// + public string JobName { get; set; } + /// + /// The storage format for this entity. Used for NCD. + /// Serialized Name: ModelVersion.modelType + /// + public string ModelType { get; set; } + /// + /// The URI path to the model contents. + /// Serialized Name: ModelVersion.modelUri + /// + public Uri ModelUri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningMountAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningMountAction.cs new file mode 100644 index 000000000000..992d22197bcd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningMountAction.cs @@ -0,0 +1,60 @@ +// 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 Action. + /// Serialized Name: MountAction + /// + public readonly partial struct MachineLearningMountAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningMountAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MountValue = "Mount"; + private const string UnmountValue = "Unmount"; + + /// + /// Mount + /// Serialized Name: MountAction.Mount + /// + public static MachineLearningMountAction Mount { get; } = new MachineLearningMountAction(MountValue); + /// + /// Unmount + /// Serialized Name: MountAction.Unmount + /// + public static MachineLearningMountAction Unmount { get; } = new MachineLearningMountAction(UnmountValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningMountAction left, MachineLearningMountAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningMountAction left, MachineLearningMountAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningMountAction(string value) => new MachineLearningMountAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningMountAction other && Equals(other); + /// + public bool Equals(MachineLearningMountAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningMountState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningMountState.cs new file mode 100644 index 000000000000..79dd34437fd0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningMountState.cs @@ -0,0 +1,84 @@ +// 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 state. + /// Serialized Name: MountState + /// + public readonly partial struct MachineLearningMountState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningMountState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MountRequestedValue = "MountRequested"; + private const string MountedValue = "Mounted"; + private const string MountFailedValue = "MountFailed"; + private const string UnmountRequestedValue = "UnmountRequested"; + private const string UnmountFailedValue = "UnmountFailed"; + private const string UnmountedValue = "Unmounted"; + + /// + /// MountRequested + /// Serialized Name: MountState.MountRequested + /// + public static MachineLearningMountState MountRequested { get; } = new MachineLearningMountState(MountRequestedValue); + /// + /// Mounted + /// Serialized Name: MountState.Mounted + /// + public static MachineLearningMountState Mounted { get; } = new MachineLearningMountState(MountedValue); + /// + /// MountFailed + /// Serialized Name: MountState.MountFailed + /// + public static MachineLearningMountState MountFailed { get; } = new MachineLearningMountState(MountFailedValue); + /// + /// UnmountRequested + /// Serialized Name: MountState.UnmountRequested + /// + public static MachineLearningMountState UnmountRequested { get; } = new MachineLearningMountState(UnmountRequestedValue); + /// + /// UnmountFailed + /// Serialized Name: MountState.UnmountFailed + /// + public static MachineLearningMountState UnmountFailed { get; } = new MachineLearningMountState(UnmountFailedValue); + /// + /// Unmounted + /// Serialized Name: MountState.Unmounted + /// + public static MachineLearningMountState Unmounted { get; } = new MachineLearningMountState(UnmountedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningMountState left, MachineLearningMountState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningMountState left, MachineLearningMountState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningMountState(string value) => new MachineLearningMountState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningMountState other && Equals(other); + /// + public bool Equals(MachineLearningMountState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNetwork.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNetwork.cs new file mode 100644 index 000000000000..f8b9b1b7b808 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNetwork.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// network of this container. + /// Serialized Name: Network + /// + public readonly partial struct MachineLearningNetwork : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningNetwork(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BridgeValue = "Bridge"; + private const string HostValue = "Host"; + + /// + /// Bridge + /// Serialized Name: Network.Bridge + /// + public static MachineLearningNetwork Bridge { get; } = new MachineLearningNetwork(BridgeValue); + /// + /// Host + /// Serialized Name: Network.Host + /// + public static MachineLearningNetwork Host { get; } = new MachineLearningNetwork(HostValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningNetwork left, MachineLearningNetwork right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningNetwork left, MachineLearningNetwork right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningNetwork(string value) => new MachineLearningNetwork(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningNetwork other && Equals(other); + /// + public bool Equals(MachineLearningNetwork other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeState.cs new file mode 100644 index 000000000000..0c7a02abc4e4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeState.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. + /// Serialized Name: NodeState + /// + public readonly partial struct MachineLearningNodeState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningNodeState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IdleValue = "idle"; + private const string RunningValue = "running"; + private const string PreparingValue = "preparing"; + private const string UnusableValue = "unusable"; + private const string LeavingValue = "leaving"; + private const string PreemptedValue = "preempted"; + + /// + /// idle + /// Serialized Name: NodeState.idle + /// + public static MachineLearningNodeState Idle { get; } = new MachineLearningNodeState(IdleValue); + /// + /// running + /// Serialized Name: NodeState.running + /// + public static MachineLearningNodeState Running { get; } = new MachineLearningNodeState(RunningValue); + /// + /// preparing + /// Serialized Name: NodeState.preparing + /// + public static MachineLearningNodeState Preparing { get; } = new MachineLearningNodeState(PreparingValue); + /// + /// unusable + /// Serialized Name: NodeState.unusable + /// + public static MachineLearningNodeState Unusable { get; } = new MachineLearningNodeState(UnusableValue); + /// + /// leaving + /// Serialized Name: NodeState.leaving + /// + public static MachineLearningNodeState Leaving { get; } = new MachineLearningNodeState(LeavingValue); + /// + /// preempted + /// Serialized Name: NodeState.preempted + /// + public static MachineLearningNodeState Preempted { get; } = new MachineLearningNodeState(PreemptedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningNodeState left, MachineLearningNodeState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningNodeState left, MachineLearningNodeState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningNodeState(string value) => new MachineLearningNodeState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningNodeState other && Equals(other); + /// + public bool Equals(MachineLearningNodeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeStateCounts.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeStateCounts.Serialization.cs new file mode 100644 index 000000000000..73224263b465 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeStateCounts.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningNodeStateCounts + { + internal static MachineLearningNodeStateCounts DeserializeMachineLearningNodeStateCounts(JsonElement element) + { + Optional idleNodeCount = default; + Optional runningNodeCount = default; + Optional preparingNodeCount = default; + Optional unusableNodeCount = default; + Optional leavingNodeCount = default; + Optional preemptedNodeCount = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("idleNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + idleNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runningNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + runningNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("preparingNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + preparingNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("unusableNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unusableNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("leavingNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + leavingNodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("preemptedNodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + preemptedNodeCount = property.Value.GetInt32(); + continue; + } + } + return new MachineLearningNodeStateCounts(Optional.ToNullable(idleNodeCount), Optional.ToNullable(runningNodeCount), Optional.ToNullable(preparingNodeCount), Optional.ToNullable(unusableNodeCount), Optional.ToNullable(leavingNodeCount), Optional.ToNullable(preemptedNodeCount)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeStateCounts.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeStateCounts.cs new file mode 100644 index 000000000000..8f97260b5ef8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNodeStateCounts.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Counts of various compute node states on the amlCompute. + /// Serialized Name: NodeStateCounts + /// + public partial class MachineLearningNodeStateCounts + { + /// Initializes a new instance of MachineLearningNodeStateCounts. + internal MachineLearningNodeStateCounts() + { + } + + /// Initializes a new instance of MachineLearningNodeStateCounts. + /// + /// Number of compute nodes in idle state. + /// Serialized Name: NodeStateCounts.idleNodeCount + /// + /// + /// Number of compute nodes which are running jobs. + /// Serialized Name: NodeStateCounts.runningNodeCount + /// + /// + /// Number of compute nodes which are being prepared. + /// Serialized Name: NodeStateCounts.preparingNodeCount + /// + /// + /// Number of compute nodes which are in unusable state. + /// Serialized Name: NodeStateCounts.unusableNodeCount + /// + /// + /// Number of compute nodes which are leaving the amlCompute. + /// Serialized Name: NodeStateCounts.leavingNodeCount + /// + /// + /// Number of compute nodes which are in preempted state. + /// Serialized Name: NodeStateCounts.preemptedNodeCount + /// + internal MachineLearningNodeStateCounts(int? idleNodeCount, int? runningNodeCount, int? preparingNodeCount, int? unusableNodeCount, int? leavingNodeCount, int? preemptedNodeCount) + { + IdleNodeCount = idleNodeCount; + RunningNodeCount = runningNodeCount; + PreparingNodeCount = preparingNodeCount; + UnusableNodeCount = unusableNodeCount; + LeavingNodeCount = leavingNodeCount; + PreemptedNodeCount = preemptedNodeCount; + } + + /// + /// Number of compute nodes in idle state. + /// Serialized Name: NodeStateCounts.idleNodeCount + /// + public int? IdleNodeCount { get; } + /// + /// Number of compute nodes which are running jobs. + /// Serialized Name: NodeStateCounts.runningNodeCount + /// + public int? RunningNodeCount { get; } + /// + /// Number of compute nodes which are being prepared. + /// Serialized Name: NodeStateCounts.preparingNodeCount + /// + public int? PreparingNodeCount { get; } + /// + /// Number of compute nodes which are in unusable state. + /// Serialized Name: NodeStateCounts.unusableNodeCount + /// + public int? UnusableNodeCount { get; } + /// + /// Number of compute nodes which are leaving the amlCompute. + /// Serialized Name: NodeStateCounts.leavingNodeCount + /// + public int? LeavingNodeCount { get; } + /// + /// Number of compute nodes which are in preempted state. + /// Serialized Name: NodeStateCounts.preemptedNodeCount + /// + public int? PreemptedNodeCount { get; } + } +} 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 new file mode 100644 index 000000000000..092eabf78887 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.Serialization.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningNoneAuthTypeWorkspaceConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningNoneAuthTypeWorkspaceConnection DeserializeMachineLearningNoneAuthTypeWorkspaceConnection(JsonElement element) + { + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional target = default; + Optional value = default; + Optional valueFormat = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authType")) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueFormat")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + continue; + } + } + return new MachineLearningNoneAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs new file mode 100644 index 000000000000..a6a0d0bb8ce5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneAuthTypeWorkspaceConnection.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningNoneAuthTypeWorkspaceConnection. + /// Serialized Name: NoneAuthTypeWorkspaceConnectionProperties + /// + public partial class MachineLearningNoneAuthTypeWorkspaceConnection : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of MachineLearningNoneAuthTypeWorkspaceConnection. + public MachineLearningNoneAuthTypeWorkspaceConnection() + { + AuthType = MachineLearningConnectionAuthType.None; + } + + /// Initializes a new instance of MachineLearningNoneAuthTypeWorkspaceConnection. + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + internal MachineLearningNoneAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat) : base(authType, category, target, value, valueFormat) + { + AuthType = authType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneDatastoreCredentials.Serialization.cs new file mode 100644 index 000000000000..f95661b29e37 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneDatastoreCredentials.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningNoneDatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("credentialsType"); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningNoneDatastoreCredentials DeserializeMachineLearningNoneDatastoreCredentials(JsonElement element) + { + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentialsType")) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningNoneDatastoreCredentials(credentialsType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneDatastoreCredentials.cs new file mode 100644 index 000000000000..af5a59d5ce94 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNoneDatastoreCredentials.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Empty/none datastore credentials. + /// Serialized Name: NoneDatastoreCredentials + /// + public partial class MachineLearningNoneDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of MachineLearningNoneDatastoreCredentials. + public MachineLearningNoneDatastoreCredentials() + { + CredentialsType = CredentialsType.None; + } + + /// Initializes a new instance of MachineLearningNoneDatastoreCredentials. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + internal MachineLearningNoneDatastoreCredentials(CredentialsType credentialsType) : base(credentialsType) + { + CredentialsType = credentialsType; + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookPreparationError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookPreparationError.Serialization.cs new file mode 100644 index 000000000000..c0d4f955cd32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookPreparationError.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningNotebookPreparationError + { + internal static MachineLearningNotebookPreparationError DeserializeMachineLearningNotebookPreparationError(JsonElement element) + { + Optional errorMessage = default; + Optional statusCode = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("errorMessage")) + { + errorMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("statusCode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + statusCode = property.Value.GetInt32(); + continue; + } + } + return new MachineLearningNotebookPreparationError(errorMessage.Value, Optional.ToNullable(statusCode)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookPreparationError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookPreparationError.cs new file mode 100644 index 000000000000..fb99ddb9d53b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookPreparationError.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningNotebookPreparationError. + /// Serialized Name: NotebookPreparationError + /// + public partial class MachineLearningNotebookPreparationError + { + /// Initializes a new instance of MachineLearningNotebookPreparationError. + internal MachineLearningNotebookPreparationError() + { + } + + /// Initializes a new instance of MachineLearningNotebookPreparationError. + /// Serialized Name: NotebookPreparationError.errorMessage. + /// Serialized Name: NotebookPreparationError.statusCode. + internal MachineLearningNotebookPreparationError(string errorMessage, int? statusCode) + { + ErrorMessage = errorMessage; + StatusCode = statusCode; + } + + /// Serialized Name: NotebookPreparationError.errorMessage. + public string ErrorMessage { get; } + /// Serialized Name: NotebookPreparationError.statusCode. + public int? StatusCode { get; } + } +} 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 new file mode 100644 index 000000000000..2c238657158f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningNotebookResourceInfo + { + internal static MachineLearningNotebookResourceInfo DeserializeMachineLearningNotebookResourceInfo(JsonElement element) + { + Optional fqdn = default; + Optional resourceId = default; + Optional notebookPreparationError = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("fqdn")) + { + fqdn = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId")) + { + resourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("notebookPreparationError")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + notebookPreparationError = null; + continue; + } + notebookPreparationError = MachineLearningNotebookPreparationError.DeserializeMachineLearningNotebookPreparationError(property.Value); + continue; + } + } + return new MachineLearningNotebookResourceInfo(fqdn.Value, resourceId.Value, notebookPreparationError.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs new file mode 100644 index 000000000000..585a31974ada --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningNotebookResourceInfo.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningNotebookResourceInfo. + /// Serialized Name: NotebookResourceInfo + /// + public partial class MachineLearningNotebookResourceInfo + { + /// Initializes a new instance of MachineLearningNotebookResourceInfo. + internal MachineLearningNotebookResourceInfo() + { + } + + /// Initializes a new instance of MachineLearningNotebookResourceInfo. + /// Serialized Name: NotebookResourceInfo.fqdn. + /// + /// the data plane resourceId that used to initialize notebook component + /// Serialized Name: NotebookResourceInfo.resourceId + /// + /// + /// The error that occurs when preparing notebook. + /// Serialized Name: NotebookResourceInfo.notebookPreparationError + /// + internal MachineLearningNotebookResourceInfo(string fqdn, string resourceId, MachineLearningNotebookPreparationError notebookPreparationError) + { + Fqdn = fqdn; + ResourceId = resourceId; + NotebookPreparationError = notebookPreparationError; + } + + /// Serialized Name: NotebookResourceInfo.fqdn. + public string Fqdn { get; } + /// + /// the data plane resourceId that used to initialize notebook component + /// Serialized Name: NotebookResourceInfo.resourceId + /// + public string ResourceId { get; } + /// + /// The error that occurs when preparing notebook. + /// Serialized Name: NotebookResourceInfo.notebookPreparationError + /// + public MachineLearningNotebookPreparationError NotebookPreparationError { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOSType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOSType.cs new file mode 100644 index 000000000000..f4204e03065b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOSType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Compute OS Type + /// Serialized Name: OsType + /// + public readonly partial struct MachineLearningOSType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// + /// Linux + /// Serialized Name: OsType.Linux + /// + public static MachineLearningOSType Linux { get; } = new MachineLearningOSType(LinuxValue); + /// + /// Windows + /// Serialized Name: OsType.Windows + /// + public static MachineLearningOSType Windows { get; } = new MachineLearningOSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOSType left, MachineLearningOSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOSType left, MachineLearningOSType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOSType(string value) => new MachineLearningOSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOSType other && Equals(other); + /// + public bool Equals(MachineLearningOSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..06344ae7b953 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningObjective : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("goal"); + writer.WriteStringValue(Goal.ToString()); + writer.WritePropertyName("primaryMetric"); + writer.WriteStringValue(PrimaryMetric); + writer.WriteEndObject(); + } + + internal static MachineLearningObjective DeserializeMachineLearningObjective(JsonElement element) + { + MachineLearningGoal goal = default; + string primaryMetric = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("goal")) + { + goal = new MachineLearningGoal(property.Value.GetString()); + continue; + } + if (property.NameEquals("primaryMetric")) + { + primaryMetric = property.Value.GetString(); + continue; + } + } + return new MachineLearningObjective(goal, primaryMetric); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs new file mode 100644 index 000000000000..304f4ca2699d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningObjective.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Optimization objective. + /// Serialized Name: Objective + /// + public partial class MachineLearningObjective + { + /// Initializes a new instance of MachineLearningObjective. + /// + /// [Required] Defines supported metric goals for hyperparameter tuning + /// Serialized Name: Objective.goal + /// + /// + /// [Required] Name of the metric to optimize. + /// Serialized Name: Objective.primaryMetric + /// + /// is null. + public MachineLearningObjective(MachineLearningGoal goal, string primaryMetric) + { + Argument.AssertNotNull(primaryMetric, nameof(primaryMetric)); + + Goal = goal; + PrimaryMetric = primaryMetric; + } + + /// + /// [Required] Defines supported metric goals for hyperparameter tuning + /// Serialized Name: Objective.goal + /// + public MachineLearningGoal Goal { get; set; } + /// + /// [Required] Name of the metric to optimize. + /// Serialized Name: Objective.primaryMetric + /// + public string PrimaryMetric { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentData.Serialization.cs new file mode 100644 index 000000000000..0e43e10b6c92 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +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 MachineLearningOnlineDeploymentData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"); + writer.WriteStringValue(Kind); + } + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static MachineLearningOnlineDeploymentData DeserializeMachineLearningOnlineDeploymentData(JsonElement element) + { + Optional identity = default; + Optional kind = default; + MachineLearningOnlineDeploymentProperties properties = default; + Optional sku = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); + continue; + } + if (property.NameEquals("kind")) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = MachineLearningOnlineDeploymentProperties.DeserializeMachineLearningOnlineDeploymentProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location")) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningOnlineDeploymentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentPatch.Serialization.cs new file mode 100644 index 000000000000..76e95dbb596e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentPatch.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOnlineDeploymentPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentPatch.cs new file mode 100644 index 000000000000..90298ab1a70a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentPatch.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Strictly used in update requests. + /// Serialized Name: PartialMinimalTrackedResourceWithSku + /// + public partial class MachineLearningOnlineDeploymentPatch : MachineLearningResourcePatch + { + /// Initializes a new instance of MachineLearningOnlineDeploymentPatch. + public MachineLearningOnlineDeploymentPatch() + { + } + + /// + /// Sku details required for ARM contract for Autoscaling. + /// Serialized Name: PartialMinimalTrackedResourceWithSku.sku + /// + public MachineLearningSkuPatch Sku { 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 new file mode 100644 index 000000000000..7f3a93e0408c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.Serialization.cs @@ -0,0 +1,401 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOnlineDeploymentProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AppInsightsEnabled)) + { + writer.WritePropertyName("appInsightsEnabled"); + writer.WriteBooleanValue(AppInsightsEnabled.Value); + } + if (Optional.IsDefined(EgressPublicNetworkAccess)) + { + writer.WritePropertyName("egressPublicNetworkAccess"); + writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); + } + writer.WritePropertyName("endpointComputeType"); + writer.WriteStringValue(EndpointComputeType.ToString()); + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsDefined(LivenessProbe)) + { + if (LivenessProbe != null) + { + writer.WritePropertyName("livenessProbe"); + writer.WriteObjectValue(LivenessProbe); + } + else + { + writer.WriteNull("livenessProbe"); + } + } + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"); + writer.WriteStringValue(Model); + } + else + { + writer.WriteNull("model"); + } + } + if (Optional.IsDefined(ModelMountPath)) + { + if (ModelMountPath != null) + { + writer.WritePropertyName("modelMountPath"); + writer.WriteStringValue(ModelMountPath); + } + else + { + writer.WriteNull("modelMountPath"); + } + } + if (Optional.IsDefined(ReadinessProbe)) + { + if (ReadinessProbe != null) + { + writer.WritePropertyName("readinessProbe"); + writer.WriteObjectValue(ReadinessProbe); + } + else + { + writer.WriteNull("readinessProbe"); + } + } + if (Optional.IsDefined(RequestSettings)) + { + if (RequestSettings != null) + { + writer.WritePropertyName("requestSettings"); + writer.WriteObjectValue(RequestSettings); + } + else + { + writer.WriteNull("requestSettings"); + } + } + if (Optional.IsDefined(ScaleSettings)) + { + if (ScaleSettings != null) + { + writer.WritePropertyName("scaleSettings"); + writer.WriteObjectValue(ScaleSettings); + } + else + { + writer.WriteNull("scaleSettings"); + } + } + if (Optional.IsDefined(CodeConfiguration)) + { + if (CodeConfiguration != null) + { + writer.WritePropertyName("codeConfiguration"); + writer.WriteObjectValue(CodeConfiguration); + } + else + { + writer.WriteNull("codeConfiguration"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(EnvironmentId)) + { + if (EnvironmentId != null) + { + writer.WritePropertyName("environmentId"); + writer.WriteStringValue(EnvironmentId); + } + else + { + writer.WriteNull("environmentId"); + } + } + if (Optional.IsCollectionDefined(EnvironmentVariables)) + { + if (EnvironmentVariables != null) + { + writer.WritePropertyName("environmentVariables"); + writer.WriteStartObject(); + foreach (var item in EnvironmentVariables) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("environmentVariables"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningOnlineDeploymentProperties DeserializeMachineLearningOnlineDeploymentProperties(JsonElement element) + { + if (element.TryGetProperty("endpointComputeType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Kubernetes": return MachineLearningKubernetesOnlineDeployment.DeserializeMachineLearningKubernetesOnlineDeployment(element); + case "Managed": return MachineLearningManagedOnlineDeployment.DeserializeMachineLearningManagedOnlineDeployment(element); + } + } + Optional appInsightsEnabled = default; + Optional egressPublicNetworkAccess = default; + MachineLearningEndpointComputeType endpointComputeType = default; + Optional instanceType = default; + Optional livenessProbe = default; + Optional model = default; + Optional modelMountPath = default; + Optional provisioningState = default; + Optional readinessProbe = default; + Optional requestSettings = default; + Optional scaleSettings = default; + Optional codeConfiguration = default; + Optional description = default; + Optional environmentId = default; + Optional> environmentVariables = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("appInsightsEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + appInsightsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("egressPublicNetworkAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + egressPublicNetworkAccess = new MachineLearningEgressPublicNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("endpointComputeType")) + { + endpointComputeType = new MachineLearningEndpointComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("instanceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("livenessProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + livenessProbe = null; + continue; + } + livenessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value); + continue; + } + if (property.NameEquals("model")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelMountPath")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + modelMountPath = null; + continue; + } + modelMountPath = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningDeploymentProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("readinessProbe")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + readinessProbe = null; + continue; + } + readinessProbe = MachineLearningProbeSettings.DeserializeMachineLearningProbeSettings(property.Value); + continue; + } + if (property.NameEquals("requestSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + requestSettings = null; + continue; + } + requestSettings = MachineLearningOnlineRequestSettings.DeserializeMachineLearningOnlineRequestSettings(property.Value); + continue; + } + if (property.NameEquals("scaleSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scaleSettings = null; + continue; + } + scaleSettings = MachineLearningOnlineScaleSettings.DeserializeMachineLearningOnlineScaleSettings(property.Value); + continue; + } + if (property.NameEquals("codeConfiguration")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + codeConfiguration = null; + continue; + } + codeConfiguration = MachineLearningCodeConfiguration.DeserializeMachineLearningCodeConfiguration(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentId = null; + continue; + } + environmentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("environmentVariables")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + environmentVariables = 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, property0.Value.GetString()); + } + } + environmentVariables = dictionary; + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + } + return new MachineLearningOnlineDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs new file mode 100644 index 000000000000..2db7d9425743 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineDeploymentProperties.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningOnlineDeploymentProperties. + /// Serialized Name: OnlineDeployment + /// Please note is the base class. According to the scenario, a derived class 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 partial class MachineLearningOnlineDeploymentProperties : MachineLearningEndpointDeploymentProperties + { + /// Initializes a new instance of MachineLearningOnlineDeploymentProperties. + public MachineLearningOnlineDeploymentProperties() + { + } + + /// Initializes a new instance of MachineLearningOnlineDeploymentProperties. + /// + /// Code configuration for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.codeConfiguration + /// + /// + /// Description of the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.description + /// + /// + /// ARM resource ID or AssetId of the environment specification for the endpoint deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentId + /// + /// + /// Environment variables configuration for the deployment. + /// Serialized Name: EndpointDeploymentPropertiesBase.environmentVariables + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointDeploymentPropertiesBase.properties + /// + /// + /// If true, enables Application Insights logging. + /// Serialized Name: OnlineDeployment.appInsightsEnabled + /// + /// + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// Serialized Name: OnlineDeployment.egressPublicNetworkAccess + /// + /// + /// [Required] The compute type of the endpoint. + /// Serialized Name: OnlineDeployment.endpointComputeType + /// + /// + /// Compute instance type. + /// Serialized Name: OnlineDeployment.instanceType + /// + /// + /// Liveness probe monitors the health of the container regularly. + /// Serialized Name: OnlineDeployment.livenessProbe + /// + /// + /// The URI path to the model. + /// Serialized Name: OnlineDeployment.model + /// + /// + /// The path to mount the model in custom container. + /// Serialized Name: OnlineDeployment.modelMountPath + /// + /// + /// Provisioning state for the endpoint deployment. + /// Serialized Name: OnlineDeployment.provisioningState + /// + /// + /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. + /// Serialized Name: OnlineDeployment.readinessProbe + /// + /// + /// Request settings for the deployment. + /// Serialized Name: OnlineDeployment.requestSettings + /// + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Serialized Name: OnlineDeployment.scaleSettings + /// Please note is the base class. According to the scenario, a derived class 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, bool? appInsightsEnabled, 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) + { + AppInsightsEnabled = appInsightsEnabled; + EgressPublicNetworkAccess = egressPublicNetworkAccess; + EndpointComputeType = endpointComputeType; + InstanceType = instanceType; + LivenessProbe = livenessProbe; + Model = model; + ModelMountPath = modelMountPath; + ProvisioningState = provisioningState; + ReadinessProbe = readinessProbe; + RequestSettings = requestSettings; + ScaleSettings = scaleSettings; + } + + /// + /// If true, enables Application Insights logging. + /// Serialized Name: OnlineDeployment.appInsightsEnabled + /// + public bool? AppInsightsEnabled { get; set; } + /// + /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. + /// Serialized Name: OnlineDeployment.egressPublicNetworkAccess + /// + public MachineLearningEgressPublicNetworkAccessType? EgressPublicNetworkAccess { get; set; } + /// + /// [Required] The compute type of the endpoint. + /// Serialized Name: OnlineDeployment.endpointComputeType + /// + internal MachineLearningEndpointComputeType EndpointComputeType { get; set; } + /// + /// Compute instance type. + /// Serialized Name: OnlineDeployment.instanceType + /// + public string InstanceType { get; set; } + /// + /// Liveness probe monitors the health of the container regularly. + /// Serialized Name: OnlineDeployment.livenessProbe + /// + public MachineLearningProbeSettings LivenessProbe { get; set; } + /// + /// The URI path to the model. + /// Serialized Name: OnlineDeployment.model + /// + public string Model { get; set; } + /// + /// The path to mount the model in custom container. + /// Serialized Name: OnlineDeployment.modelMountPath + /// + public string ModelMountPath { get; set; } + /// + /// Provisioning state for the endpoint deployment. + /// Serialized Name: OnlineDeployment.provisioningState + /// + 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. + /// Serialized Name: OnlineDeployment.readinessProbe + /// + public MachineLearningProbeSettings ReadinessProbe { get; set; } + /// + /// Request settings for the deployment. + /// Serialized Name: OnlineDeployment.requestSettings + /// + public MachineLearningOnlineRequestSettings RequestSettings { get; set; } + /// + /// Scale settings for the deployment. + /// If it is null or not provided, + /// it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment + /// and to DefaultScaleSettings for ManagedOnlineDeployment. + /// Serialized Name: OnlineDeployment.scaleSettings + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningOnlineScaleSettings ScaleSettings { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointData.Serialization.cs new file mode 100644 index 000000000000..379e7ee99e3e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +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 MachineLearningOnlineEndpointData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + if (Optional.IsDefined(Kind)) + { + writer.WritePropertyName("kind"); + writer.WriteStringValue(Kind); + } + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"); + writer.WriteObjectValue(Sku); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("location"); + writer.WriteStringValue(Location); + writer.WriteEndObject(); + } + + internal static MachineLearningOnlineEndpointData DeserializeMachineLearningOnlineEndpointData(JsonElement element) + { + Optional identity = default; + Optional kind = default; + MachineLearningOnlineEndpointProperties properties = default; + Optional sku = default; + Optional> tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); + continue; + } + if (property.NameEquals("kind")) + { + kind = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + properties = MachineLearningOnlineEndpointProperties.DeserializeMachineLearningOnlineEndpointProperties(property.Value); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location")) + { + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningOnlineEndpointData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); + } + } +} 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 new file mode 100644 index 000000000000..e6bbb43b9943 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.Serialization.cs @@ -0,0 +1,232 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOnlineEndpointProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Compute)) + { + if (Compute != null) + { + writer.WritePropertyName("compute"); + writer.WriteStringValue(Compute); + } + else + { + writer.WriteNull("compute"); + } + } + if (Optional.IsDefined(PublicNetworkAccess)) + { + writer.WritePropertyName("publicNetworkAccess"); + writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); + } + if (Optional.IsCollectionDefined(Traffic)) + { + if (Traffic != null) + { + writer.WritePropertyName("traffic"); + writer.WriteStartObject(); + foreach (var item in Traffic) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("traffic"); + } + } + writer.WritePropertyName("authMode"); + writer.WriteStringValue(AuthMode.ToString()); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Keys)) + { + if (Keys != null) + { + writer.WritePropertyName("keys"); + writer.WriteObjectValue(Keys); + } + else + { + writer.WriteNull("keys"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningOnlineEndpointProperties DeserializeMachineLearningOnlineEndpointProperties(JsonElement element) + { + Optional compute = default; + Optional provisioningState = default; + Optional publicNetworkAccess = default; + Optional> traffic = default; + MachineLearningEndpointAuthMode authMode = default; + Optional description = default; + Optional keys = default; + Optional> properties = default; + Optional scoringUri = default; + Optional swaggerUri = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("compute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + compute = null; + continue; + } + compute = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningEndpointProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("publicNetworkAccess")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + publicNetworkAccess = new MachineLearningPublicNetworkAccessType(property.Value.GetString()); + continue; + } + if (property.NameEquals("traffic")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + traffic = 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("authMode")) + { + authMode = new MachineLearningEndpointAuthMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("keys")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + keys = null; + continue; + } + keys = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(property.Value); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("scoringUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + scoringUri = null; + continue; + } + scoringUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("swaggerUri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + swaggerUri = null; + continue; + } + swaggerUri = new Uri(property.Value.GetString()); + continue; + } + } + return new MachineLearningOnlineEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value, compute.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(publicNetworkAccess), Optional.ToDictionary(traffic)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs new file mode 100644 index 000000000000..27ee9f7eb6a4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineEndpointProperties.cs @@ -0,0 +1,103 @@ +// 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 +{ + /// + /// Online endpoint configuration + /// Serialized Name: OnlineEndpoint + /// + public partial class MachineLearningOnlineEndpointProperties : MachineLearningEndpointProperties + { + /// Initializes a new instance of MachineLearningOnlineEndpointProperties. + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + public MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode) : base(authMode) + { + Traffic = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningOnlineEndpointProperties. + /// + /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. + /// Serialized Name: EndpointPropertiesBase.authMode + /// + /// + /// Description of the inference endpoint. + /// Serialized Name: EndpointPropertiesBase.description + /// + /// + /// EndpointAuthKeys to set initially on an Endpoint. + /// This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. + /// Serialized Name: EndpointPropertiesBase.keys + /// + /// + /// Property dictionary. Properties can be added, but not removed or altered. + /// Serialized Name: EndpointPropertiesBase.properties + /// + /// + /// Endpoint URI. + /// Serialized Name: EndpointPropertiesBase.scoringUri + /// + /// + /// Endpoint Swagger URI. + /// Serialized Name: EndpointPropertiesBase.swaggerUri + /// + /// + /// ARM resource ID of the compute if it exists. + /// optional + /// Serialized Name: OnlineEndpoint.compute + /// + /// + /// Provisioning state for the endpoint. + /// Serialized Name: OnlineEndpoint.provisioningState + /// + /// + /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + /// Serialized Name: OnlineEndpoint.publicNetworkAccess + /// + /// + /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + /// Serialized Name: OnlineEndpoint.traffic + /// + internal MachineLearningOnlineEndpointProperties(MachineLearningEndpointAuthMode authMode, string description, MachineLearningEndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, string compute, MachineLearningEndpointProvisioningState? provisioningState, MachineLearningPublicNetworkAccessType? publicNetworkAccess, IDictionary traffic) : base(authMode, description, keys, properties, scoringUri, swaggerUri) + { + Compute = compute; + ProvisioningState = provisioningState; + PublicNetworkAccess = publicNetworkAccess; + Traffic = traffic; + } + + /// + /// ARM resource ID of the compute if it exists. + /// optional + /// Serialized Name: OnlineEndpoint.compute + /// + public string Compute { get; set; } + /// + /// Provisioning state for the endpoint. + /// Serialized Name: OnlineEndpoint.provisioningState + /// + public MachineLearningEndpointProvisioningState? ProvisioningState { get; } + /// + /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. + /// Serialized Name: OnlineEndpoint.publicNetworkAccess + /// + public MachineLearningPublicNetworkAccessType? PublicNetworkAccess { get; set; } + /// + /// Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100. + /// Serialized Name: OnlineEndpoint.traffic + /// + public IDictionary Traffic { 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 new file mode 100644 index 000000000000..ce8d1f3e9031 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.Serialization.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOnlineRequestSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxConcurrentRequestsPerInstance)) + { + writer.WritePropertyName("maxConcurrentRequestsPerInstance"); + writer.WriteNumberValue(MaxConcurrentRequestsPerInstance.Value); + } + if (Optional.IsDefined(MaxQueueWait)) + { + writer.WritePropertyName("maxQueueWait"); + writer.WriteStringValue(MaxQueueWait.Value, "P"); + } + if (Optional.IsDefined(RequestTimeout)) + { + writer.WritePropertyName("requestTimeout"); + writer.WriteStringValue(RequestTimeout.Value, "P"); + } + writer.WriteEndObject(); + } + + internal static MachineLearningOnlineRequestSettings DeserializeMachineLearningOnlineRequestSettings(JsonElement element) + { + Optional maxConcurrentRequestsPerInstance = default; + Optional maxQueueWait = default; + Optional requestTimeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxConcurrentRequestsPerInstance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxConcurrentRequestsPerInstance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxQueueWait")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxQueueWait = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("requestTimeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + requestTimeout = property.Value.GetTimeSpan("P"); + continue; + } + } + return new MachineLearningOnlineRequestSettings(Optional.ToNullable(maxConcurrentRequestsPerInstance), Optional.ToNullable(maxQueueWait), Optional.ToNullable(requestTimeout)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs new file mode 100644 index 000000000000..d62bae75033b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineRequestSettings.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Online deployment scoring requests configuration. + /// Serialized Name: OnlineRequestSettings + /// + public partial class MachineLearningOnlineRequestSettings + { + /// Initializes a new instance of MachineLearningOnlineRequestSettings. + public MachineLearningOnlineRequestSettings() + { + } + + /// Initializes a new instance of MachineLearningOnlineRequestSettings. + /// + /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + /// Serialized Name: OnlineRequestSettings.maxConcurrentRequestsPerInstance + /// + /// + /// The maximum amount of time a request will stay in the queue in ISO 8601 format. + /// Defaults to 500ms. + /// Serialized Name: OnlineRequestSettings.maxQueueWait + /// + /// + /// The scoring timeout in ISO 8601 format. + /// Defaults to 5000ms. + /// Serialized Name: OnlineRequestSettings.requestTimeout + /// + internal MachineLearningOnlineRequestSettings(int? maxConcurrentRequestsPerInstance, TimeSpan? maxQueueWait, TimeSpan? requestTimeout) + { + MaxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; + MaxQueueWait = maxQueueWait; + RequestTimeout = requestTimeout; + } + + /// + /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. + /// Serialized Name: OnlineRequestSettings.maxConcurrentRequestsPerInstance + /// + public int? MaxConcurrentRequestsPerInstance { get; set; } + /// + /// The maximum amount of time a request will stay in the queue in ISO 8601 format. + /// Defaults to 500ms. + /// Serialized Name: OnlineRequestSettings.maxQueueWait + /// + public TimeSpan? MaxQueueWait { get; set; } + /// + /// The scoring timeout in ISO 8601 format. + /// Defaults to 5000ms. + /// Serialized Name: OnlineRequestSettings.requestTimeout + /// + public TimeSpan? RequestTimeout { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineScaleSettings.Serialization.cs new file mode 100644 index 000000000000..7041f0d1b687 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineScaleSettings.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOnlineScaleSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("scaleType"); + writer.WriteStringValue(ScaleType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningOnlineScaleSettings DeserializeMachineLearningOnlineScaleSettings(JsonElement element) + { + if (element.TryGetProperty("scaleType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Default": return MachineLearningDefaultScaleSettings.DeserializeMachineLearningDefaultScaleSettings(element); + case "TargetUtilization": return MachineLearningTargetUtilizationScaleSettings.DeserializeMachineLearningTargetUtilizationScaleSettings(element); + } + } + return UnknownOnlineScaleSettings.DeserializeUnknownOnlineScaleSettings(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineScaleSettings.cs new file mode 100644 index 000000000000..ae2f922e2946 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOnlineScaleSettings.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Online deployment scaling configuration. + /// Serialized Name: OnlineScaleSettings + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningOnlineScaleSettings + { + /// Initializes a new instance of MachineLearningOnlineScaleSettings. + protected MachineLearningOnlineScaleSettings() + { + } + + /// Initializes a new instance of MachineLearningOnlineScaleSettings. + /// + /// [Required] Type of deployment scaling algorithm + /// Serialized Name: OnlineScaleSettings.scaleType + /// + internal MachineLearningOnlineScaleSettings(ScaleType scaleType) + { + ScaleType = scaleType; + } + + /// + /// [Required] Type of deployment scaling algorithm + /// Serialized Name: OnlineScaleSettings.scaleType + /// + internal ScaleType ScaleType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperatingSystemType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperatingSystemType.cs new file mode 100644 index 000000000000..23ecfe8318aa --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperatingSystemType.cs @@ -0,0 +1,60 @@ +// 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 type of operating system. + /// Serialized Name: OperatingSystemType + /// + public readonly partial struct MachineLearningOperatingSystemType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOperatingSystemType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// + /// Linux + /// Serialized Name: OperatingSystemType.Linux + /// + public static MachineLearningOperatingSystemType Linux { get; } = new MachineLearningOperatingSystemType(LinuxValue); + /// + /// Windows + /// Serialized Name: OperatingSystemType.Windows + /// + public static MachineLearningOperatingSystemType Windows { get; } = new MachineLearningOperatingSystemType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOperatingSystemType left, MachineLearningOperatingSystemType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOperatingSystemType left, MachineLearningOperatingSystemType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOperatingSystemType(string value) => new MachineLearningOperatingSystemType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOperatingSystemType other && Equals(other); + /// + public bool Equals(MachineLearningOperatingSystemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs new file mode 100644 index 000000000000..7ef6c937252d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationName.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Name of the last operation. + /// Serialized Name: OperationName + /// + public readonly partial struct MachineLearningOperationName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOperationName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreateValue = "Create"; + private const string StartValue = "Start"; + private const string StopValue = "Stop"; + private const string RestartValue = "Restart"; + private const string ReimageValue = "Reimage"; + private const string DeleteValue = "Delete"; + + /// + /// Create + /// Serialized Name: OperationName.Create + /// + public static MachineLearningOperationName Create { get; } = new MachineLearningOperationName(CreateValue); + /// + /// Start + /// Serialized Name: OperationName.Start + /// + public static MachineLearningOperationName Start { get; } = new MachineLearningOperationName(StartValue); + /// + /// Stop + /// Serialized Name: OperationName.Stop + /// + public static MachineLearningOperationName Stop { get; } = new MachineLearningOperationName(StopValue); + /// + /// Restart + /// Serialized Name: OperationName.Restart + /// + public static MachineLearningOperationName Restart { get; } = new MachineLearningOperationName(RestartValue); + /// + /// Reimage + /// Serialized Name: OperationName.Reimage + /// + public static MachineLearningOperationName Reimage { get; } = new MachineLearningOperationName(ReimageValue); + /// + /// Delete + /// Serialized Name: OperationName.Delete + /// + public static MachineLearningOperationName Delete { get; } = new MachineLearningOperationName(DeleteValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOperationName left, MachineLearningOperationName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOperationName left, MachineLearningOperationName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOperationName(string value) => new MachineLearningOperationName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOperationName other && Equals(other); + /// + public bool Equals(MachineLearningOperationName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs new file mode 100644 index 000000000000..3244ebe48e9b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationStatus.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Operation status. + /// Serialized Name: OperationStatus + /// + public readonly partial struct MachineLearningOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InProgressValue = "InProgress"; + private const string SucceededValue = "Succeeded"; + private const string CreateFailedValue = "CreateFailed"; + private const string StartFailedValue = "StartFailed"; + private const string StopFailedValue = "StopFailed"; + private const string RestartFailedValue = "RestartFailed"; + private const string ReimageFailedValue = "ReimageFailed"; + private const string DeleteFailedValue = "DeleteFailed"; + + /// + /// InProgress + /// Serialized Name: OperationStatus.InProgress + /// + public static MachineLearningOperationStatus InProgress { get; } = new MachineLearningOperationStatus(InProgressValue); + /// + /// Succeeded + /// Serialized Name: OperationStatus.Succeeded + /// + public static MachineLearningOperationStatus Succeeded { get; } = new MachineLearningOperationStatus(SucceededValue); + /// + /// CreateFailed + /// Serialized Name: OperationStatus.CreateFailed + /// + public static MachineLearningOperationStatus CreateFailed { get; } = new MachineLearningOperationStatus(CreateFailedValue); + /// + /// StartFailed + /// Serialized Name: OperationStatus.StartFailed + /// + public static MachineLearningOperationStatus StartFailed { get; } = new MachineLearningOperationStatus(StartFailedValue); + /// + /// StopFailed + /// Serialized Name: OperationStatus.StopFailed + /// + public static MachineLearningOperationStatus StopFailed { get; } = new MachineLearningOperationStatus(StopFailedValue); + /// + /// RestartFailed + /// Serialized Name: OperationStatus.RestartFailed + /// + public static MachineLearningOperationStatus RestartFailed { get; } = new MachineLearningOperationStatus(RestartFailedValue); + /// + /// ReimageFailed + /// Serialized Name: OperationStatus.ReimageFailed + /// + public static MachineLearningOperationStatus ReimageFailed { get; } = new MachineLearningOperationStatus(ReimageFailedValue); + /// + /// DeleteFailed + /// Serialized Name: OperationStatus.DeleteFailed + /// + public static MachineLearningOperationStatus DeleteFailed { get; } = new MachineLearningOperationStatus(DeleteFailedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOperationStatus left, MachineLearningOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOperationStatus left, MachineLearningOperationStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOperationStatus(string value) => new MachineLearningOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOperationStatus other && Equals(other); + /// + public bool Equals(MachineLearningOperationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationTrigger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationTrigger.cs new file mode 100644 index 000000000000..d4d8c99a14be --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOperationTrigger.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Trigger of operation. + /// Serialized Name: OperationTrigger + /// + public readonly partial struct MachineLearningOperationTrigger : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOperationTrigger(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserValue = "User"; + private const string ScheduleValue = "Schedule"; + private const string IdleShutdownValue = "IdleShutdown"; + + /// + /// User + /// Serialized Name: OperationTrigger.User + /// + public static MachineLearningOperationTrigger User { get; } = new MachineLearningOperationTrigger(UserValue); + /// + /// Schedule + /// Serialized Name: OperationTrigger.Schedule + /// + public static MachineLearningOperationTrigger Schedule { get; } = new MachineLearningOperationTrigger(ScheduleValue); + /// + /// IdleShutdown + /// Serialized Name: OperationTrigger.IdleShutdown + /// + public static MachineLearningOperationTrigger IdleShutdown { get; } = new MachineLearningOperationTrigger(IdleShutdownValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOperationTrigger left, MachineLearningOperationTrigger right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOperationTrigger left, MachineLearningOperationTrigger right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOperationTrigger(string value) => new MachineLearningOperationTrigger(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOperationTrigger other && Equals(other); + /// + public bool Equals(MachineLearningOperationTrigger other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOrderString.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOrderString.cs new file mode 100644 index 000000000000..32acea745e4b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOrderString.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningOrderString. + /// Serialized Name: OrderString + /// + public readonly partial struct MachineLearningOrderString : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOrderString(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedAtDescValue = "CreatedAtDesc"; + private const string CreatedAtAscValue = "CreatedAtAsc"; + private const string UpdatedAtDescValue = "UpdatedAtDesc"; + private const string UpdatedAtAscValue = "UpdatedAtAsc"; + + /// + /// CreatedAtDesc + /// Serialized Name: OrderString.CreatedAtDesc + /// + public static MachineLearningOrderString CreatedAtDesc { get; } = new MachineLearningOrderString(CreatedAtDescValue); + /// + /// CreatedAtAsc + /// Serialized Name: OrderString.CreatedAtAsc + /// + public static MachineLearningOrderString CreatedAtAsc { get; } = new MachineLearningOrderString(CreatedAtAscValue); + /// + /// UpdatedAtDesc + /// Serialized Name: OrderString.UpdatedAtDesc + /// + public static MachineLearningOrderString UpdatedAtDesc { get; } = new MachineLearningOrderString(UpdatedAtDescValue); + /// + /// UpdatedAtAsc + /// Serialized Name: OrderString.UpdatedAtAsc + /// + public static MachineLearningOrderString UpdatedAtAsc { get; } = new MachineLearningOrderString(UpdatedAtAscValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOrderString left, MachineLearningOrderString right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOrderString left, MachineLearningOrderString right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOrderString(string value) => new MachineLearningOrderString(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOrderString other && Equals(other); + /// + public bool Equals(MachineLearningOrderString other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs new file mode 100644 index 000000000000..5049baad35f1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputDeliveryMode.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Output data delivery mode enums. + /// Serialized Name: OutputDeliveryMode + /// + public readonly partial struct MachineLearningOutputDeliveryMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningOutputDeliveryMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReadWriteMountValue = "ReadWriteMount"; + private const string UploadValue = "Upload"; + + /// + /// ReadWriteMount + /// Serialized Name: OutputDeliveryMode.ReadWriteMount + /// + public static MachineLearningOutputDeliveryMode ReadWriteMount { get; } = new MachineLearningOutputDeliveryMode(ReadWriteMountValue); + /// + /// Upload + /// Serialized Name: OutputDeliveryMode.Upload + /// + public static MachineLearningOutputDeliveryMode Upload { get; } = new MachineLearningOutputDeliveryMode(UploadValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningOutputDeliveryMode left, MachineLearningOutputDeliveryMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningOutputDeliveryMode left, MachineLearningOutputDeliveryMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningOutputDeliveryMode(string value) => new MachineLearningOutputDeliveryMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningOutputDeliveryMode other && Equals(other); + /// + public bool Equals(MachineLearningOutputDeliveryMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..85d42b4c4715 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.Serialization.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningOutputPathAssetReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(JobId)) + { + if (JobId != null) + { + writer.WritePropertyName("jobId"); + writer.WriteStringValue(JobId); + } + else + { + writer.WriteNull("jobId"); + } + } + if (Optional.IsDefined(Path)) + { + if (Path != null) + { + writer.WritePropertyName("path"); + writer.WriteStringValue(Path); + } + else + { + writer.WriteNull("path"); + } + } + writer.WritePropertyName("referenceType"); + writer.WriteStringValue(ReferenceType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningOutputPathAssetReference DeserializeMachineLearningOutputPathAssetReference(JsonElement element) + { + Optional jobId = default; + Optional path = default; + ReferenceType referenceType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("jobId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jobId = null; + continue; + } + jobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("path")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + path = null; + continue; + } + path = property.Value.GetString(); + continue; + } + if (property.NameEquals("referenceType")) + { + referenceType = new ReferenceType(property.Value.GetString()); + continue; + } + } + return new MachineLearningOutputPathAssetReference(referenceType, jobId.Value, path.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs new file mode 100644 index 000000000000..b35479d3f33a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningOutputPathAssetReference.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Reference to an asset via its path in a job output. + /// Serialized Name: OutputPathAssetReference + /// + public partial class MachineLearningOutputPathAssetReference : MachineLearningAssetReferenceBase + { + /// Initializes a new instance of MachineLearningOutputPathAssetReference. + public MachineLearningOutputPathAssetReference() + { + ReferenceType = ReferenceType.OutputPath; + } + + /// Initializes a new instance of MachineLearningOutputPathAssetReference. + /// + /// [Required] Specifies the type of asset reference. + /// Serialized Name: AssetReferenceBase.referenceType + /// + /// + /// ARM resource ID of the job. + /// Serialized Name: OutputPathAssetReference.jobId + /// + /// + /// The path of the file/directory in the job output. + /// Serialized Name: OutputPathAssetReference.path + /// + internal MachineLearningOutputPathAssetReference(ReferenceType referenceType, string jobId, string path) : base(referenceType) + { + JobId = jobId; + Path = path; + ReferenceType = referenceType; + } + + /// + /// ARM resource ID of the job. + /// Serialized Name: OutputPathAssetReference.jobId + /// + public string JobId { get; set; } + /// + /// The path of the file/directory in the job output. + /// Serialized Name: OutputPathAssetReference.path + /// + public string Path { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPasswordDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPasswordDetail.Serialization.cs new file mode 100644 index 000000000000..da9f591bd606 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPasswordDetail.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningPasswordDetail + { + internal static MachineLearningPasswordDetail DeserializeMachineLearningPasswordDetail(JsonElement element) + { + Optional name = default; + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + } + return new MachineLearningPasswordDetail(name.Value, value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPasswordDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPasswordDetail.cs new file mode 100644 index 000000000000..f9c31228dc43 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPasswordDetail.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningPasswordDetail. + /// Serialized Name: Password + /// + public partial class MachineLearningPasswordDetail + { + /// Initializes a new instance of MachineLearningPasswordDetail. + internal MachineLearningPasswordDetail() + { + } + + /// Initializes a new instance of MachineLearningPasswordDetail. + /// Serialized Name: Password.name. + /// Serialized Name: Password.value. + internal MachineLearningPasswordDetail(string name, string value) + { + Name = name; + Value = value; + } + + /// Serialized Name: Password.name. + public string Name { get; } + /// Serialized Name: Password.value. + public string Value { get; } + } +} 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 new file mode 100644 index 000000000000..d4439527da63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningPatAuthTypeWorkspaceConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningPatAuthTypeWorkspaceConnection DeserializeMachineLearningPatAuthTypeWorkspaceConnection(JsonElement element) + { + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional target = default; + Optional value = default; + Optional valueFormat = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + credentials = WorkspaceConnectionPersonalAccessToken.DeserializeWorkspaceConnectionPersonalAccessToken(property.Value); + continue; + } + if (property.NameEquals("authType")) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueFormat")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + continue; + } + } + return new MachineLearningPatAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs new file mode 100644 index 000000000000..cb48e2707412 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPatAuthTypeWorkspaceConnection.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningPatAuthTypeWorkspaceConnection. + /// Serialized Name: PATAuthTypeWorkspaceConnectionProperties + /// + public partial class MachineLearningPatAuthTypeWorkspaceConnection : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of MachineLearningPatAuthTypeWorkspaceConnection. + public MachineLearningPatAuthTypeWorkspaceConnection() + { + AuthType = MachineLearningConnectionAuthType.Pat; + } + + /// Initializes a new instance of MachineLearningPatAuthTypeWorkspaceConnection. + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + /// Serialized Name: PATAuthTypeWorkspaceConnectionProperties.credentials. + internal MachineLearningPatAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, WorkspaceConnectionPersonalAccessToken credentials) : base(authType, category, target, value, valueFormat) + { + Credentials = credentials; + AuthType = authType; + } + + /// Serialized Name: PATAuthTypeWorkspaceConnectionProperties.credentials. + internal WorkspaceConnectionPersonalAccessToken Credentials { get; set; } + /// Serialized Name: WorkspaceConnectionPersonalAccessToken.pat. + public string CredentialsPat + { + get => Credentials is null ? default : Credentials.Pat; + set + { + if (Credentials is null) + Credentials = new WorkspaceConnectionPersonalAccessToken(); + Credentials.Pat = value; + } + } + } +} 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 new file mode 100644 index 000000000000..dfbcada17509 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.Serialization.cs @@ -0,0 +1,485 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningPipelineJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs != null) + { + writer.WritePropertyName("inputs"); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputs"); + } + } + if (Optional.IsCollectionDefined(Jobs)) + { + if (Jobs != null) + { + writer.WritePropertyName("jobs"); + writer.WriteStartObject(); + foreach (var item in Jobs) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("jobs"); + } + } + if (Optional.IsCollectionDefined(Outputs)) + { + if (Outputs != null) + { + writer.WritePropertyName("outputs"); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("outputs"); + } + } + if (Optional.IsDefined(Settings)) + { + if (Settings != null) + { + writer.WritePropertyName("settings"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Settings); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(Settings.ToString()).RootElement); +#endif + } + else + { + writer.WriteNull("settings"); + } + } + if (Optional.IsDefined(SourceJobId)) + { + if (SourceJobId != null) + { + writer.WritePropertyName("sourceJobId"); + writer.WriteStringValue(SourceJobId); + } + else + { + writer.WriteNull("sourceJobId"); + } + } + if (Optional.IsDefined(ComponentId)) + { + if (ComponentId != null) + { + writer.WritePropertyName("componentId"); + writer.WriteStringValue(ComponentId); + } + else + { + writer.WriteNull("componentId"); + } + } + if (Optional.IsDefined(ComputeId)) + { + if (ComputeId != null) + { + writer.WritePropertyName("computeId"); + writer.WriteStringValue(ComputeId); + } + else + { + writer.WriteNull("computeId"); + } + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsDefined(Identity)) + { + if (Identity != null) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + else + { + writer.WriteNull("identity"); + } + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) + { + writer.WritePropertyName("services"); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("services"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningPipelineJob DeserializeMachineLearningPipelineJob(JsonElement element) + { + Optional> inputs = default; + Optional> jobs = default; + Optional> outputs = default; + Optional settings = default; + Optional sourceJobId = default; + Optional componentId = default; + Optional computeId = default; + Optional displayName = default; + Optional experimentName = default; + Optional identity = default; + Optional isArchived = default; + JobType jobType = default; + Optional> services = default; + Optional status = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputs = 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, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value)); + } + } + inputs = dictionary; + continue; + } + if (property.NameEquals("jobs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jobs = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + jobs = dictionary; + continue; + } + if (property.NameEquals("outputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputs = 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, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value)); + } + } + outputs = dictionary; + continue; + } + if (property.NameEquals("settings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + settings = null; + continue; + } + settings = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("sourceJobId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sourceJobId = null; + continue; + } + sourceJobId = property.Value.GetString(); + continue; + } + if (property.NameEquals("componentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentId = null; + continue; + } + componentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + computeId = null; + continue; + } + computeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + identity = null; + continue; + } + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("services")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + services = 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, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); + } + } + services = dictionary; + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningPipelineJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), Optional.ToDictionary(inputs), Optional.ToDictionary(jobs), Optional.ToDictionary(outputs), settings.Value, sourceJobId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs new file mode 100644 index 000000000000..ebfe2e3713a7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPipelineJob.cs @@ -0,0 +1,200 @@ +// 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 +{ + /// + /// Pipeline Job definition: defines generic to MFE attributes. + /// Serialized Name: PipelineJob + /// + public partial class MachineLearningPipelineJob : MachineLearningJobProperties + { + /// Initializes a new instance of MachineLearningPipelineJob. + public MachineLearningPipelineJob() + { + Inputs = new ChangeTrackingDictionary(); + Jobs = new ChangeTrackingDictionary(); + Outputs = new ChangeTrackingDictionary(); + JobType = JobType.Pipeline; + } + + /// Initializes a new instance of MachineLearningPipelineJob. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// ARM resource ID of the component resource. + /// Serialized Name: JobBase.componentId + /// + /// + /// ARM resource ID of the compute resource. + /// Serialized Name: JobBase.computeId + /// + /// + /// Display name of job. + /// Serialized Name: JobBase.displayName + /// + /// + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Serialized Name: JobBase.experimentName + /// + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Serialized Name: JobBase.identity + /// Please note is the base class. According to the scenario, a derived class 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? + /// Serialized Name: JobBase.isArchived + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobBase.jobType + /// + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// Serialized Name: JobBase.services + /// + /// + /// Status of the job. + /// Serialized Name: JobBase.status + /// + /// + /// Inputs for the pipeline job. + /// Serialized Name: PipelineJob.inputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: PipelineJob.jobs + /// + /// + /// Outputs for the pipeline job + /// Serialized Name: PipelineJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: PipelineJob.settings + /// + /// + /// ARM resource ID of source job. + /// Serialized Name: PipelineJob.sourceJobId + /// + internal MachineLearningPipelineJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, IDictionary inputs, IDictionary jobs, IDictionary outputs, BinaryData settings, string sourceJobId) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + { + Inputs = inputs; + Jobs = jobs; + Outputs = outputs; + Settings = settings; + SourceJobId = sourceJobId; + JobType = jobType; + } + + /// + /// Inputs for the pipeline job. + /// Serialized Name: PipelineJob.inputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: PipelineJob.jobs + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 Jobs { get; set; } + /// + /// Outputs for the pipeline job + /// Serialized Name: PipelineJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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; } + /// + /// Pipeline settings, for things like ContinueRunOnStepFailure etc. + /// Serialized Name: PipelineJob.settings + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated 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 Settings { get; set; } + /// + /// ARM resource ID of source job. + /// Serialized Name: PipelineJob.sourceJobId + /// + public string SourceJobId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.Serialization.cs new file mode 100644 index 000000000000..75b4db34f7ff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningPrivateEndpoint : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WriteEndObject(); + } + + internal static MachineLearningPrivateEndpoint DeserializeMachineLearningPrivateEndpoint(JsonElement element) + { + Optional id = default; + Optional subnetArmId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetArmId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + subnetArmId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + } + return new MachineLearningPrivateEndpoint(id.Value, subnetArmId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs new file mode 100644 index 000000000000..c5cf2e553b7a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpoint.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The Private Endpoint resource. + /// Serialized Name: PrivateEndpoint + /// + public partial class MachineLearningPrivateEndpoint + { + /// Initializes a new instance of MachineLearningPrivateEndpoint. + public MachineLearningPrivateEndpoint() + { + } + + /// Initializes a new instance of MachineLearningPrivateEndpoint. + /// + /// The ARM identifier for Private Endpoint + /// Serialized Name: PrivateEndpoint.id + /// + /// + /// The ARM identifier for Subnet resource that private endpoint links to + /// Serialized Name: PrivateEndpoint.subnetArmId + /// + internal MachineLearningPrivateEndpoint(ResourceIdentifier id, ResourceIdentifier subnetArmId) + { + Id = id; + SubnetArmId = subnetArmId; + } + + /// + /// The ARM identifier for Private Endpoint + /// Serialized Name: PrivateEndpoint.id + /// + public ResourceIdentifier Id { get; } + /// + /// The ARM identifier for Subnet resource that private endpoint links to + /// Serialized Name: PrivateEndpoint.subnetArmId + /// + public ResourceIdentifier SubnetArmId { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionData.Serialization.cs index 26f401144cb8..5d58e936731a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionData.Serialization.cs @@ -68,7 +68,7 @@ internal static MachineLearningPrivateEndpointConnectionData DeserializeMachineL string name = default; ResourceType type = default; Optional systemData = default; - Optional privateEndpoint = default; + Optional privateEndpoint = default; Optional privateLinkServiceConnectionState = default; Optional provisioningState = default; foreach (var property in element.EnumerateObject()) @@ -155,7 +155,7 @@ internal static MachineLearningPrivateEndpointConnectionData DeserializeMachineL property0.ThrowNonNullablePropertyIsNull(); continue; } - privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value); + privateEndpoint = MachineLearningPrivateEndpoint.DeserializeMachineLearningPrivateEndpoint(property0.Value); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionListResult.cs index cff1969befb8..83bcce8135b3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionListResult.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// List of private endpoint connection associated with the specified workspace. + /// + /// List of private endpoint connection associated with the specified workspace + /// Serialized Name: PrivateEndpointConnectionListResult + /// internal partial class MachineLearningPrivateEndpointConnectionListResult { /// Initializes a new instance of MachineLearningPrivateEndpointConnectionListResult. @@ -21,13 +24,19 @@ internal MachineLearningPrivateEndpointConnectionListResult() } /// Initializes a new instance of MachineLearningPrivateEndpointConnectionListResult. - /// Array of private endpoint connections. + /// + /// Array of private endpoint connections + /// Serialized Name: PrivateEndpointConnectionListResult.value + /// internal MachineLearningPrivateEndpointConnectionListResult(IReadOnlyList value) { Value = value; } - /// Array of private endpoint connections. + /// + /// Array of private endpoint connections + /// Serialized Name: PrivateEndpointConnectionListResult.value + /// public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionProvisioningState.cs index cf571e8017e5..c3d8216757fa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionProvisioningState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateEndpointConnectionProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The current provisioning state. + /// + /// The current provisioning state. + /// Serialized Name: PrivateEndpointConnectionProvisioningState + /// public readonly partial struct MachineLearningPrivateEndpointConnectionProvisioningState : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public MachineLearningPrivateEndpointConnectionProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string FailedValue = "Failed"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: PrivateEndpointConnectionProvisioningState.Succeeded + /// public static MachineLearningPrivateEndpointConnectionProvisioningState Succeeded { get; } = new MachineLearningPrivateEndpointConnectionProvisioningState(SucceededValue); - /// Creating. + /// + /// Creating + /// Serialized Name: PrivateEndpointConnectionProvisioningState.Creating + /// public static MachineLearningPrivateEndpointConnectionProvisioningState Creating { get; } = new MachineLearningPrivateEndpointConnectionProvisioningState(CreatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: PrivateEndpointConnectionProvisioningState.Deleting + /// public static MachineLearningPrivateEndpointConnectionProvisioningState Deleting { get; } = new MachineLearningPrivateEndpointConnectionProvisioningState(DeletingValue); - /// Failed. + /// + /// Failed + /// Serialized Name: PrivateEndpointConnectionProvisioningState.Failed + /// public static MachineLearningPrivateEndpointConnectionProvisioningState Failed { get; } = new MachineLearningPrivateEndpointConnectionProvisioningState(FailedValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningPrivateEndpointConnectionProvisioningState left, MachineLearningPrivateEndpointConnectionProvisioningState right) => left.Equals(right); 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 cef5a601f541..171f1ac1122a 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,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The private endpoint connection status. + /// + /// The private endpoint connection status. + /// Serialized Name: PrivateEndpointServiceConnectionStatus + /// public readonly partial struct MachineLearningPrivateEndpointServiceConnectionStatus : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public MachineLearningPrivateEndpointServiceConnectionStatus(string value) private const string DisconnectedValue = "Disconnected"; private const string TimeoutValue = "Timeout"; - /// Pending. + /// + /// Pending + /// Serialized Name: PrivateEndpointServiceConnectionStatus.Pending + /// public static MachineLearningPrivateEndpointServiceConnectionStatus Pending { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(PendingValue); - /// Approved. + /// + /// Approved + /// Serialized Name: PrivateEndpointServiceConnectionStatus.Approved + /// public static MachineLearningPrivateEndpointServiceConnectionStatus Approved { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(ApprovedValue); - /// Rejected. + /// + /// Rejected + /// Serialized Name: PrivateEndpointServiceConnectionStatus.Rejected + /// public static MachineLearningPrivateEndpointServiceConnectionStatus Rejected { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(RejectedValue); - /// Disconnected. + /// + /// Disconnected + /// Serialized Name: PrivateEndpointServiceConnectionStatus.Disconnected + /// public static MachineLearningPrivateEndpointServiceConnectionStatus Disconnected { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(DisconnectedValue); - /// Timeout. + /// + /// Timeout + /// Serialized Name: PrivateEndpointServiceConnectionStatus.Timeout + /// public static MachineLearningPrivateEndpointServiceConnectionStatus Timeout { get; } = new MachineLearningPrivateEndpointServiceConnectionStatus(TimeoutValue); /// Determines if two values are the same. public static bool operator ==(MachineLearningPrivateEndpointServiceConnectionStatus left, MachineLearningPrivateEndpointServiceConnectionStatus right) => left.Equals(right); 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 244ca6e2ff07..eb2af31c729a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResource.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A private link resource. + /// + /// A private link resource + /// Serialized Name: PrivateLinkResource + /// public partial class MachineLearningPrivateLinkResource : TrackedResourceData { /// Initializes a new instance of MachineLearningPrivateLinkResource. @@ -29,11 +32,26 @@ public MachineLearningPrivateLinkResource(AzureLocation location) : base(locatio /// The systemData. /// 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. + /// + /// The identity of the resource. + /// Serialized Name: PrivateLinkResource.identity + /// + /// + /// The sku of the workspace. + /// Serialized Name: PrivateLinkResource.sku + /// + /// + /// The private link resource group id. + /// Serialized Name: PrivateLinkResource.properties.groupId + /// + /// + /// The private link resource required member names. + /// Serialized Name: PrivateLinkResource.properties.requiredMembers + /// + /// + /// The private link resource Private link DNS zone name. + /// Serialized Name: PrivateLinkResource.properties.requiredZoneNames + /// internal MachineLearningPrivateLinkResource(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, MachineLearningSku sku, string groupId, IReadOnlyList requiredMembers, IList requiredZoneNames) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; @@ -43,15 +61,30 @@ internal MachineLearningPrivateLinkResource(ResourceIdentifier id, string name, RequiredZoneNames = requiredZoneNames; } - /// The identity of the resource. + /// + /// The identity of the resource. + /// Serialized Name: PrivateLinkResource.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// The sku of the workspace. + /// + /// The sku of the workspace. + /// Serialized Name: PrivateLinkResource.sku + /// public MachineLearningSku Sku { get; set; } - /// The private link resource group id. + /// + /// The private link resource group id. + /// Serialized Name: PrivateLinkResource.properties.groupId + /// public string GroupId { get; } - /// The private link resource required member names. + /// + /// The private link resource required member names. + /// Serialized Name: PrivateLinkResource.properties.requiredMembers + /// public IReadOnlyList RequiredMembers { get; } - /// The private link resource Private link DNS zone name. + /// + /// The private link resource Private link DNS zone name. + /// Serialized Name: PrivateLinkResource.properties.requiredZoneNames + /// public IList RequiredZoneNames { 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 92d821de5a90..8206f6c7c1bc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkResourceListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A list of private link resources. + /// + /// A list of private link resources + /// Serialized Name: PrivateLinkResourceListResult + /// internal partial class MachineLearningPrivateLinkResourceListResult { /// Initializes a new instance of MachineLearningPrivateLinkResourceListResult. @@ -20,13 +23,19 @@ internal MachineLearningPrivateLinkResourceListResult() } /// Initializes a new instance of MachineLearningPrivateLinkResourceListResult. - /// Array of private link resources. + /// + /// Array of private link resources + /// Serialized Name: PrivateLinkResourceListResult.value + /// internal MachineLearningPrivateLinkResourceListResult(IReadOnlyList value) { Value = value; } - /// Array of private link resources. + /// + /// Array of private link resources + /// Serialized Name: PrivateLinkResourceListResult.value + /// public IReadOnlyList Value { get; } } } 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 9d1c6a219c0f..3a37b0f0d36d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPrivateLinkServiceConnectionState.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A collection of information about the state of the connection between service consumer and provider. + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// Serialized Name: PrivateLinkServiceConnectionState + /// public partial class MachineLearningPrivateLinkServiceConnectionState { /// Initializes a new instance of MachineLearningPrivateLinkServiceConnectionState. @@ -16,9 +19,18 @@ public MachineLearningPrivateLinkServiceConnectionState() } /// Initializes a new instance of MachineLearningPrivateLinkServiceConnectionState. - /// 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. + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// Serialized Name: PrivateLinkServiceConnectionState.status + /// + /// + /// The reason for approval/rejection of the connection. + /// Serialized Name: PrivateLinkServiceConnectionState.description + /// + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// Serialized Name: PrivateLinkServiceConnectionState.actionsRequired + /// internal MachineLearningPrivateLinkServiceConnectionState(MachineLearningPrivateEndpointServiceConnectionStatus? status, string description, string actionsRequired) { Status = status; @@ -26,11 +38,20 @@ internal MachineLearningPrivateLinkServiceConnectionState(MachineLearningPrivate ActionsRequired = actionsRequired; } - /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// Serialized Name: PrivateLinkServiceConnectionState.status + /// public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } - /// The reason for approval/rejection of the connection. + /// + /// The reason for approval/rejection of the connection. + /// Serialized Name: PrivateLinkServiceConnectionState.description + /// public string Description { get; set; } - /// A message indicating if changes on the service provider require any updates on the consumer. + /// + /// A message indicating if changes on the service provider require any updates on the consumer. + /// Serialized Name: PrivateLinkServiceConnectionState.actionsRequired + /// 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 new file mode 100644 index 000000000000..77b54e8a6882 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningProbeSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(FailureThreshold)) + { + writer.WritePropertyName("failureThreshold"); + writer.WriteNumberValue(FailureThreshold.Value); + } + if (Optional.IsDefined(InitialDelay)) + { + if (InitialDelay != null) + { + writer.WritePropertyName("initialDelay"); + writer.WriteStringValue(InitialDelay.Value, "P"); + } + else + { + writer.WriteNull("initialDelay"); + } + } + if (Optional.IsDefined(Period)) + { + writer.WritePropertyName("period"); + writer.WriteStringValue(Period.Value, "P"); + } + if (Optional.IsDefined(SuccessThreshold)) + { + writer.WritePropertyName("successThreshold"); + writer.WriteNumberValue(SuccessThreshold.Value); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout.Value, "P"); + } + writer.WriteEndObject(); + } + + internal static MachineLearningProbeSettings DeserializeMachineLearningProbeSettings(JsonElement element) + { + Optional failureThreshold = default; + Optional initialDelay = default; + Optional period = default; + Optional successThreshold = default; + Optional timeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("failureThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + failureThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("initialDelay")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + initialDelay = null; + continue; + } + initialDelay = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("period")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + period = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("successThreshold")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + successThreshold = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + timeout = property.Value.GetTimeSpan("P"); + continue; + } + } + return new MachineLearningProbeSettings(Optional.ToNullable(failureThreshold), Optional.ToNullable(initialDelay), Optional.ToNullable(period), Optional.ToNullable(successThreshold), Optional.ToNullable(timeout)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs new file mode 100644 index 000000000000..ab656900ab68 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProbeSettings.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Deployment container liveness/readiness probe configuration. + /// Serialized Name: ProbeSettings + /// + public partial class MachineLearningProbeSettings + { + /// Initializes a new instance of MachineLearningProbeSettings. + public MachineLearningProbeSettings() + { + } + + /// Initializes a new instance of MachineLearningProbeSettings. + /// + /// The number of failures to allow before returning an unhealthy status. + /// Serialized Name: ProbeSettings.failureThreshold + /// + /// + /// The delay before the first probe in ISO 8601 format. + /// Serialized Name: ProbeSettings.initialDelay + /// + /// + /// The length of time between probes in ISO 8601 format. + /// Serialized Name: ProbeSettings.period + /// + /// + /// The number of successful probes before returning a healthy status. + /// Serialized Name: ProbeSettings.successThreshold + /// + /// + /// The probe timeout in ISO 8601 format. + /// Serialized Name: ProbeSettings.timeout + /// + internal MachineLearningProbeSettings(int? failureThreshold, TimeSpan? initialDelay, TimeSpan? period, int? successThreshold, TimeSpan? timeout) + { + FailureThreshold = failureThreshold; + InitialDelay = initialDelay; + Period = period; + SuccessThreshold = successThreshold; + Timeout = timeout; + } + + /// + /// The number of failures to allow before returning an unhealthy status. + /// Serialized Name: ProbeSettings.failureThreshold + /// + public int? FailureThreshold { get; set; } + /// + /// The delay before the first probe in ISO 8601 format. + /// Serialized Name: ProbeSettings.initialDelay + /// + public TimeSpan? InitialDelay { get; set; } + /// + /// The length of time between probes in ISO 8601 format. + /// Serialized Name: ProbeSettings.period + /// + public TimeSpan? Period { get; set; } + /// + /// The number of successful probes before returning a healthy status. + /// Serialized Name: ProbeSettings.successThreshold + /// + public int? SuccessThreshold { get; set; } + /// + /// The probe timeout in ISO 8601 format. + /// Serialized Name: ProbeSettings.timeout + /// + public TimeSpan? Timeout { 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 new file mode 100644 index 000000000000..64a169b1a88a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningProvisioningState.cs @@ -0,0 +1,90 @@ +// 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 current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. + /// Serialized Name: ProvisioningState + /// + public readonly partial struct MachineLearningProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UnknownValue = "Unknown"; + private const string UpdatingValue = "Updating"; + private const string CreatingValue = "Creating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// + /// Unknown + /// Serialized Name: ProvisioningState.Unknown + /// + public static MachineLearningProvisioningState Unknown { get; } = new MachineLearningProvisioningState(UnknownValue); + /// + /// Updating + /// Serialized Name: ProvisioningState.Updating + /// + public static MachineLearningProvisioningState Updating { get; } = new MachineLearningProvisioningState(UpdatingValue); + /// + /// Creating + /// Serialized Name: ProvisioningState.Creating + /// + public static MachineLearningProvisioningState Creating { get; } = new MachineLearningProvisioningState(CreatingValue); + /// + /// Deleting + /// Serialized Name: ProvisioningState.Deleting + /// + public static MachineLearningProvisioningState Deleting { get; } = new MachineLearningProvisioningState(DeletingValue); + /// + /// Succeeded + /// Serialized Name: ProvisioningState.Succeeded + /// + public static MachineLearningProvisioningState Succeeded { get; } = new MachineLearningProvisioningState(SucceededValue); + /// + /// Failed + /// Serialized Name: ProvisioningState.Failed + /// + public static MachineLearningProvisioningState Failed { get; } = new MachineLearningProvisioningState(FailedValue); + /// + /// Canceled + /// Serialized Name: ProvisioningState.Canceled + /// + public static MachineLearningProvisioningState Canceled { get; } = new MachineLearningProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningProvisioningState left, MachineLearningProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningProvisioningState left, MachineLearningProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningProvisioningState(string value) => new MachineLearningProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningProvisioningState other && Equals(other); + /// + public bool Equals(MachineLearningProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccess.cs new file mode 100644 index 000000000000..f0efdb7ccceb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccess.cs @@ -0,0 +1,60 @@ +// 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. + /// Serialized Name: PublicNetworkAccess + /// + public readonly partial struct MachineLearningPublicNetworkAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningPublicNetworkAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// + /// Enabled + /// Serialized Name: PublicNetworkAccess.Enabled + /// + public static MachineLearningPublicNetworkAccess Enabled { get; } = new MachineLearningPublicNetworkAccess(EnabledValue); + /// + /// Disabled + /// Serialized Name: PublicNetworkAccess.Disabled + /// + public static MachineLearningPublicNetworkAccess Disabled { get; } = new MachineLearningPublicNetworkAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningPublicNetworkAccess left, MachineLearningPublicNetworkAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningPublicNetworkAccess left, MachineLearningPublicNetworkAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningPublicNetworkAccess(string value) => new MachineLearningPublicNetworkAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningPublicNetworkAccess other && Equals(other); + /// + public bool Equals(MachineLearningPublicNetworkAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccessType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccessType.cs new file mode 100644 index 000000000000..87d8e66becc3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningPublicNetworkAccessType.cs @@ -0,0 +1,60 @@ +// 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 whether PublicNetworkAccess is Enabled or Disabled. + /// Serialized Name: PublicNetworkAccessType + /// + public readonly partial struct MachineLearningPublicNetworkAccessType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningPublicNetworkAccessType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// + /// Enabled + /// Serialized Name: PublicNetworkAccessType.Enabled + /// + public static MachineLearningPublicNetworkAccessType Enabled { get; } = new MachineLearningPublicNetworkAccessType(EnabledValue); + /// + /// Disabled + /// Serialized Name: PublicNetworkAccessType.Disabled + /// + public static MachineLearningPublicNetworkAccessType Disabled { get; } = new MachineLearningPublicNetworkAccessType(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningPublicNetworkAccessType left, MachineLearningPublicNetworkAccessType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningPublicNetworkAccessType left, MachineLearningPublicNetworkAccessType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningPublicNetworkAccessType(string value) => new MachineLearningPublicNetworkAccessType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningPublicNetworkAccessType other && Equals(other); + /// + public bool Equals(MachineLearningPublicNetworkAccessType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaProperties.Serialization.cs new file mode 100644 index 000000000000..fb3c65341e21 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaProperties.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningQuotaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(QuotaBasePropertiesType)) + { + writer.WritePropertyName("type"); + writer.WriteStringValue(QuotaBasePropertiesType); + } + if (Optional.IsDefined(Limit)) + { + writer.WritePropertyName("limit"); + writer.WriteNumberValue(Limit.Value); + } + if (Optional.IsDefined(Unit)) + { + writer.WritePropertyName("unit"); + writer.WriteStringValue(Unit.Value.ToString()); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaProperties.cs new file mode 100644 index 000000000000..610111090ef1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The properties for Quota update or retrieval. + /// Serialized Name: QuotaBaseProperties + /// + public partial class MachineLearningQuotaProperties + { + /// Initializes a new instance of MachineLearningQuotaProperties. + public MachineLearningQuotaProperties() + { + } + + /// + /// Specifies the resource ID. + /// Serialized Name: QuotaBaseProperties.id + /// + public string Id { get; set; } + /// + /// Specifies the resource type. + /// Serialized Name: QuotaBaseProperties.type + /// + public string QuotaBasePropertiesType { get; set; } + /// + /// The maximum permitted quota of the resource. + /// Serialized Name: QuotaBaseProperties.limit + /// + public long? Limit { get; set; } + /// + /// An enum describing the unit of quota measurement. + /// Serialized Name: QuotaBaseProperties.unit + /// + public MachineLearningQuotaUnit? Unit { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUnit.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUnit.cs new file mode 100644 index 000000000000..5c37561fa7e8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUnit.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// An enum describing the unit of quota measurement. + /// Serialized Name: QuotaUnit + /// + public readonly partial struct MachineLearningQuotaUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningQuotaUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "Count"; + + /// + /// Count + /// Serialized Name: QuotaUnit.Count + /// + public static MachineLearningQuotaUnit Count { get; } = new MachineLearningQuotaUnit(CountValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningQuotaUnit left, MachineLearningQuotaUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningQuotaUnit left, MachineLearningQuotaUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningQuotaUnit(string value) => new MachineLearningQuotaUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningQuotaUnit other && Equals(other); + /// + public bool Equals(MachineLearningQuotaUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUpdateContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUpdateContent.Serialization.cs new file mode 100644 index 000000000000..87b52b8d42e0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUpdateContent.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningQuotaUpdateContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"); + writer.WriteStringValue(Location.Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUpdateContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUpdateContent.cs new file mode 100644 index 000000000000..28e1bf91c5fe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningQuotaUpdateContent.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Quota update parameters. + /// Serialized Name: QuotaUpdateParameters + /// + public partial class MachineLearningQuotaUpdateContent + { + /// Initializes a new instance of MachineLearningQuotaUpdateContent. + public MachineLearningQuotaUpdateContent() + { + Value = new ChangeTrackingList(); + } + + /// + /// The list for update quota. + /// Serialized Name: QuotaUpdateParameters.value + /// + public IList Value { get; } + /// + /// Region of workspace quota to be updated. + /// Serialized Name: QuotaUpdateParameters.location + /// + public AzureLocation? Location { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceFrequency.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceFrequency.cs new file mode 100644 index 000000000000..f90d408a862e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceFrequency.cs @@ -0,0 +1,78 @@ +// 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 describe the frequency of a recurrence schedule + /// Serialized Name: RecurrenceFrequency + /// + public readonly partial struct MachineLearningRecurrenceFrequency : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningRecurrenceFrequency(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MinuteValue = "Minute"; + private const string HourValue = "Hour"; + private const string DayValue = "Day"; + private const string WeekValue = "Week"; + private const string MonthValue = "Month"; + + /// + /// Minute frequency + /// Serialized Name: RecurrenceFrequency.Minute + /// + public static MachineLearningRecurrenceFrequency Minute { get; } = new MachineLearningRecurrenceFrequency(MinuteValue); + /// + /// Hour frequency + /// Serialized Name: RecurrenceFrequency.Hour + /// + public static MachineLearningRecurrenceFrequency Hour { get; } = new MachineLearningRecurrenceFrequency(HourValue); + /// + /// Day frequency + /// Serialized Name: RecurrenceFrequency.Day + /// + public static MachineLearningRecurrenceFrequency Day { get; } = new MachineLearningRecurrenceFrequency(DayValue); + /// + /// Week frequency + /// Serialized Name: RecurrenceFrequency.Week + /// + public static MachineLearningRecurrenceFrequency Week { get; } = new MachineLearningRecurrenceFrequency(WeekValue); + /// + /// Month frequency + /// Serialized Name: RecurrenceFrequency.Month + /// + public static MachineLearningRecurrenceFrequency Month { get; } = new MachineLearningRecurrenceFrequency(MonthValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningRecurrenceFrequency left, MachineLearningRecurrenceFrequency right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningRecurrenceFrequency left, MachineLearningRecurrenceFrequency right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningRecurrenceFrequency(string value) => new MachineLearningRecurrenceFrequency(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningRecurrenceFrequency other && Equals(other); + /// + public bool Equals(MachineLearningRecurrenceFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _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 new file mode 100644 index 000000000000..6bcaeee49e91 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningRecurrenceSchedule : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("hours"); + writer.WriteStartArray(); + foreach (var item in Hours) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("minutes"); + writer.WriteStartArray(); + foreach (var item in Minutes) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(MonthDays)) + { + if (MonthDays != null) + { + writer.WritePropertyName("monthDays"); + writer.WriteStartArray(); + foreach (var item in MonthDays) + { + writer.WriteNumberValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("monthDays"); + } + } + if (Optional.IsCollectionDefined(WeekDays)) + { + if (WeekDays != null) + { + writer.WritePropertyName("weekDays"); + writer.WriteStartArray(); + foreach (var item in WeekDays) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("weekDays"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningRecurrenceSchedule DeserializeMachineLearningRecurrenceSchedule(JsonElement element) + { + IList hours = default; + IList minutes = default; + Optional> monthDays = default; + Optional> weekDays = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hours")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + hours = array; + continue; + } + if (property.NameEquals("minutes")) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + minutes = array; + continue; + } + if (property.NameEquals("monthDays")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + monthDays = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + monthDays = array; + continue; + } + if (property.NameEquals("weekDays")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + weekDays = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new MachineLearningWeekday(item.GetString())); + } + weekDays = array; + continue; + } + } + return new MachineLearningRecurrenceSchedule(hours, minutes, Optional.ToList(monthDays), Optional.ToList(weekDays)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs new file mode 100644 index 000000000000..befadd197127 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceSchedule.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningRecurrenceSchedule. + /// Serialized Name: RecurrenceSchedule + /// + public partial class MachineLearningRecurrenceSchedule + { + /// Initializes a new instance of MachineLearningRecurrenceSchedule. + /// + /// [Required] List of hours for the schedule. + /// Serialized Name: RecurrenceSchedule.hours + /// + /// + /// [Required] List of minutes for the schedule. + /// Serialized Name: RecurrenceSchedule.minutes + /// + /// or is null. + public MachineLearningRecurrenceSchedule(IEnumerable hours, IEnumerable minutes) + { + Argument.AssertNotNull(hours, nameof(hours)); + Argument.AssertNotNull(minutes, nameof(minutes)); + + Hours = hours.ToList(); + Minutes = minutes.ToList(); + MonthDays = new ChangeTrackingList(); + WeekDays = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningRecurrenceSchedule. + /// + /// [Required] List of hours for the schedule. + /// Serialized Name: RecurrenceSchedule.hours + /// + /// + /// [Required] List of minutes for the schedule. + /// Serialized Name: RecurrenceSchedule.minutes + /// + /// + /// List of month days for the schedule + /// Serialized Name: RecurrenceSchedule.monthDays + /// + /// + /// List of days for the schedule. + /// Serialized Name: RecurrenceSchedule.weekDays + /// + internal MachineLearningRecurrenceSchedule(IList hours, IList minutes, IList monthDays, IList weekDays) + { + Hours = hours; + Minutes = minutes; + MonthDays = monthDays; + WeekDays = weekDays; + } + + /// + /// [Required] List of hours for the schedule. + /// Serialized Name: RecurrenceSchedule.hours + /// + public IList Hours { get; } + /// + /// [Required] List of minutes for the schedule. + /// Serialized Name: RecurrenceSchedule.minutes + /// + public IList Minutes { get; } + /// + /// List of month days for the schedule + /// Serialized Name: RecurrenceSchedule.monthDays + /// + public IList MonthDays { get; set; } + /// + /// List of days for the schedule. + /// Serialized Name: RecurrenceSchedule.weekDays + /// + public IList WeekDays { 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 new file mode 100644 index 000000000000..8f06f0a131e8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningRecurrenceTrigger : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("frequency"); + writer.WriteStringValue(Frequency.ToString()); + writer.WritePropertyName("interval"); + writer.WriteNumberValue(Interval); + if (Optional.IsDefined(Schedule)) + { + if (Schedule != null) + { + writer.WritePropertyName("schedule"); + writer.WriteObjectValue(Schedule); + } + else + { + writer.WriteNull("schedule"); + } + } + if (Optional.IsDefined(EndTime)) + { + if (EndTime != null) + { + writer.WritePropertyName("endTime"); + writer.WriteStringValue(EndTime); + } + else + { + writer.WriteNull("endTime"); + } + } + if (Optional.IsDefined(StartTime)) + { + if (StartTime != null) + { + writer.WritePropertyName("startTime"); + writer.WriteStringValue(StartTime); + } + else + { + writer.WriteNull("startTime"); + } + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"); + writer.WriteStringValue(TimeZone); + } + writer.WritePropertyName("triggerType"); + writer.WriteStringValue(TriggerType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningRecurrenceTrigger DeserializeMachineLearningRecurrenceTrigger(JsonElement element) + { + MachineLearningRecurrenceFrequency frequency = default; + int interval = default; + Optional schedule = default; + Optional endTime = default; + Optional startTime = default; + Optional timeZone = default; + MachineLearningTriggerType triggerType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("frequency")) + { + frequency = new MachineLearningRecurrenceFrequency(property.Value.GetString()); + continue; + } + if (property.NameEquals("interval")) + { + interval = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("schedule")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + schedule = null; + continue; + } + schedule = MachineLearningRecurrenceSchedule.DeserializeMachineLearningRecurrenceSchedule(property.Value); + continue; + } + if (property.NameEquals("endTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + endTime = null; + continue; + } + endTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("startTime")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + startTime = null; + continue; + } + startTime = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone")) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("triggerType")) + { + triggerType = new MachineLearningTriggerType(property.Value.GetString()); + continue; + } + } + return new MachineLearningRecurrenceTrigger(endTime.Value, startTime.Value, timeZone.Value, triggerType, frequency, interval, schedule.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs new file mode 100644 index 000000000000..9a22405b18a9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRecurrenceTrigger.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningRecurrenceTrigger. + /// Serialized Name: RecurrenceTrigger + /// + public partial class MachineLearningRecurrenceTrigger : MachineLearningTriggerBase + { + /// Initializes a new instance of MachineLearningRecurrenceTrigger. + /// + /// [Required] The frequency to trigger schedule. + /// Serialized Name: RecurrenceTrigger.frequency + /// + /// + /// [Required] Specifies schedule interval in conjunction with frequency + /// Serialized Name: RecurrenceTrigger.interval + /// + public MachineLearningRecurrenceTrigger(MachineLearningRecurrenceFrequency frequency, int interval) + { + Frequency = frequency; + Interval = interval; + TriggerType = MachineLearningTriggerType.Recurrence; + } + + /// Initializes a new instance of MachineLearningRecurrenceTrigger. + /// + /// 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" + /// If not present, the schedule will run indefinitely + /// Serialized Name: TriggerBase.endTime + /// + /// + /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + /// Serialized Name: TriggerBase.startTime + /// + /// + /// 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 + /// Serialized Name: TriggerBase.timeZone + /// + /// + /// [Required] + /// Serialized Name: TriggerBase.triggerType + /// + /// + /// [Required] The frequency to trigger schedule. + /// Serialized Name: RecurrenceTrigger.frequency + /// + /// + /// [Required] Specifies schedule interval in conjunction with frequency + /// Serialized Name: RecurrenceTrigger.interval + /// + /// + /// The recurrence schedule. + /// Serialized Name: RecurrenceTrigger.schedule + /// + internal MachineLearningRecurrenceTrigger(string endTime, string startTime, string timeZone, MachineLearningTriggerType triggerType, MachineLearningRecurrenceFrequency frequency, int interval, MachineLearningRecurrenceSchedule schedule) : base(endTime, startTime, timeZone, triggerType) + { + Frequency = frequency; + Interval = interval; + Schedule = schedule; + TriggerType = triggerType; + } + + /// + /// [Required] The frequency to trigger schedule. + /// Serialized Name: RecurrenceTrigger.frequency + /// + public MachineLearningRecurrenceFrequency Frequency { get; set; } + /// + /// [Required] Specifies schedule interval in conjunction with frequency + /// Serialized Name: RecurrenceTrigger.interval + /// + public int Interval { get; set; } + /// + /// The recurrence schedule. + /// Serialized Name: RecurrenceTrigger.schedule + /// + public MachineLearningRecurrenceSchedule Schedule { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRemoteLoginPortPublicAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRemoteLoginPortPublicAccess.cs new file mode 100644 index 000000000000..44f60f4293df --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningRemoteLoginPortPublicAccess.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. + /// Serialized Name: RemoteLoginPortPublicAccess + /// + public readonly partial struct MachineLearningRemoteLoginPortPublicAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningRemoteLoginPortPublicAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + private const string NotSpecifiedValue = "NotSpecified"; + + /// + /// Enabled + /// Serialized Name: RemoteLoginPortPublicAccess.Enabled + /// + public static MachineLearningRemoteLoginPortPublicAccess Enabled { get; } = new MachineLearningRemoteLoginPortPublicAccess(EnabledValue); + /// + /// Disabled + /// Serialized Name: RemoteLoginPortPublicAccess.Disabled + /// + public static MachineLearningRemoteLoginPortPublicAccess Disabled { get; } = new MachineLearningRemoteLoginPortPublicAccess(DisabledValue); + /// + /// NotSpecified + /// Serialized Name: RemoteLoginPortPublicAccess.NotSpecified + /// + public static MachineLearningRemoteLoginPortPublicAccess NotSpecified { get; } = new MachineLearningRemoteLoginPortPublicAccess(NotSpecifiedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningRemoteLoginPortPublicAccess left, MachineLearningRemoteLoginPortPublicAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningRemoteLoginPortPublicAccess left, MachineLearningRemoteLoginPortPublicAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningRemoteLoginPortPublicAccess(string value) => new MachineLearningRemoteLoginPortPublicAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningRemoteLoginPortPublicAccess other && Equals(other); + /// + public bool Equals(MachineLearningRemoteLoginPortPublicAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..1d2d5a338dcb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.Serialization.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningResourceBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningResourceBase DeserializeMachineLearningResourceBase(JsonElement element) + { + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningResourceBase(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs new file mode 100644 index 000000000000..f5679ab852b4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceBase.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningResourceBase. + /// Serialized Name: ResourceBase + /// + public partial class MachineLearningResourceBase + { + /// Initializes a new instance of MachineLearningResourceBase. + public MachineLearningResourceBase() + { + Properties = new ChangeTrackingDictionary(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningResourceBase. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + internal MachineLearningResourceBase(string description, IDictionary properties, IDictionary tags) + { + Description = description; + Properties = properties; + Tags = tags; + } + + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + public string Description { get; set; } + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + public IDictionary Properties { get; set; } + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + public IDictionary Tags { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs new file mode 100644 index 000000000000..f2f407c828a8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.Serialization.cs @@ -0,0 +1,108 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningResourceConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(InstanceCount)) + { + writer.WritePropertyName("instanceCount"); + writer.WriteNumberValue(InstanceCount.Value); + } + if (Optional.IsDefined(InstanceType)) + { + if (InstanceType != null) + { + writer.WritePropertyName("instanceType"); + writer.WriteStringValue(InstanceType); + } + else + { + writer.WriteNull("instanceType"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("properties"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningResourceConfiguration DeserializeMachineLearningResourceConfiguration(JsonElement element) + { + Optional instanceCount = default; + Optional instanceType = default; + Optional> properties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("instanceCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + instanceCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("instanceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + instanceType = null; + continue; + } + instanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + properties = dictionary; + continue; + } + } + return new MachineLearningResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs new file mode 100644 index 000000000000..c81fafc32406 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceConfiguration.cs @@ -0,0 +1,89 @@ +// 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 MachineLearningResourceConfiguration. + /// Serialized Name: ResourceConfiguration + /// + public partial class MachineLearningResourceConfiguration + { + /// Initializes a new instance of MachineLearningResourceConfiguration. + public MachineLearningResourceConfiguration() + { + Properties = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of MachineLearningResourceConfiguration. + /// + /// Optional number of instances or nodes used by the compute target. + /// Serialized Name: ResourceConfiguration.instanceCount + /// + /// + /// Optional type of VM used as supported by the compute target. + /// Serialized Name: ResourceConfiguration.instanceType + /// + /// + /// Additional properties bag. + /// Serialized Name: ResourceConfiguration.properties + /// + internal MachineLearningResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties) + { + InstanceCount = instanceCount; + InstanceType = instanceType; + Properties = properties; + } + + /// + /// Optional number of instances or nodes used by the compute target. + /// Serialized Name: ResourceConfiguration.instanceCount + /// + public int? InstanceCount { get; set; } + /// + /// Optional type of VM used as supported by the compute target. + /// Serialized Name: ResourceConfiguration.instanceType + /// + public string InstanceType { get; set; } + /// + /// Additional properties bag. + /// Serialized Name: ResourceConfiguration.properties + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceName.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceName.Serialization.cs new file mode 100644 index 000000000000..2ed84edfe60a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceName.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningResourceName + { + internal static MachineLearningResourceName DeserializeMachineLearningResourceName(JsonElement element) + { + Optional value = default; + Optional localizedValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue")) + { + localizedValue = property.Value.GetString(); + continue; + } + } + return new MachineLearningResourceName(value.Value, localizedValue.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceName.cs new file mode 100644 index 000000000000..aac00015eb21 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceName.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The Resource Name. + /// Serialized Name: ResourceName + /// + public partial class MachineLearningResourceName + { + /// Initializes a new instance of MachineLearningResourceName. + internal MachineLearningResourceName() + { + } + + /// Initializes a new instance of MachineLearningResourceName. + /// + /// The name of the resource. + /// Serialized Name: ResourceName.value + /// + /// + /// The localized name of the resource. + /// Serialized Name: ResourceName.localizedValue + /// + internal MachineLearningResourceName(string value, string localizedValue) + { + Value = value; + LocalizedValue = localizedValue; + } + + /// + /// The name of the resource. + /// Serialized Name: ResourceName.value + /// + public string Value { get; } + /// + /// The localized name of the resource. + /// Serialized Name: ResourceName.localizedValue + /// + public string LocalizedValue { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatch.Serialization.cs new file mode 100644 index 000000000000..92b46ecf4d83 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatch.Serialization.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningResourcePatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatch.cs new file mode 100644 index 000000000000..48fb3388800d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatch.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Strictly used in update requests. + /// Serialized Name: PartialMinimalTrackedResource + /// + public partial class MachineLearningResourcePatch + { + /// Initializes a new instance of MachineLearningResourcePatch. + public MachineLearningResourcePatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// + /// Resource tags. + /// Serialized Name: PartialMinimalTrackedResource.tags + /// + public IDictionary Tags { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatchWithIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatchWithIdentity.Serialization.cs new file mode 100644 index 000000000000..5f20140dcaa9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatchWithIdentity.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningResourcePatchWithIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatchWithIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatchWithIdentity.cs new file mode 100644 index 000000000000..2453575cf5f2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourcePatchWithIdentity.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Strictly used in update requests. + /// Serialized Name: PartialMinimalTrackedResourceWithIdentity + /// + public partial class MachineLearningResourcePatchWithIdentity : MachineLearningResourcePatch + { + /// Initializes a new instance of MachineLearningResourcePatchWithIdentity. + public MachineLearningResourcePatchWithIdentity() + { + } + + /// + /// Managed service identity (system assigned and/or user assigned identities) + /// Serialized Name: PartialMinimalTrackedResourceWithIdentity.identity + /// + public MachineLearningPartialManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceQuota.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceQuota.Serialization.cs new file mode 100644 index 000000000000..89f43405f46d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceQuota.Serialization.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningResourceQuota + { + internal static MachineLearningResourceQuota DeserializeMachineLearningResourceQuota(JsonElement element) + { + Optional id = default; + Optional amlWorkspaceLocation = default; + Optional type = default; + Optional name = default; + Optional limit = default; + Optional unit = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("amlWorkspaceLocation")) + { + amlWorkspaceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("name")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + name = MachineLearningResourceName.DeserializeMachineLearningResourceName(property.Value); + continue; + } + if (property.NameEquals("limit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + limit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("unit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unit = new MachineLearningQuotaUnit(property.Value.GetString()); + continue; + } + } + return new MachineLearningResourceQuota(id.Value, amlWorkspaceLocation.Value, type.Value, name.Value, Optional.ToNullable(limit), Optional.ToNullable(unit)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceQuota.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceQuota.cs new file mode 100644 index 000000000000..e961e56d6eb9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningResourceQuota.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The quota assigned to a resource. + /// Serialized Name: ResourceQuota + /// + public partial class MachineLearningResourceQuota + { + /// Initializes a new instance of MachineLearningResourceQuota. + internal MachineLearningResourceQuota() + { + } + + /// Initializes a new instance of MachineLearningResourceQuota. + /// + /// Specifies the resource ID. + /// Serialized Name: ResourceQuota.id + /// + /// + /// Region of the AML workspace in the id. + /// Serialized Name: ResourceQuota.amlWorkspaceLocation + /// + /// + /// Specifies the resource type. + /// Serialized Name: ResourceQuota.type + /// + /// + /// Name of the resource. + /// Serialized Name: ResourceQuota.name + /// + /// + /// The maximum permitted quota of the resource. + /// Serialized Name: ResourceQuota.limit + /// + /// + /// An enum describing the unit of quota measurement. + /// Serialized Name: ResourceQuota.unit + /// + internal MachineLearningResourceQuota(string id, string amlWorkspaceLocation, string resourceQuotaType, MachineLearningResourceName name, long? limit, MachineLearningQuotaUnit? unit) + { + Id = id; + AmlWorkspaceLocation = amlWorkspaceLocation; + ResourceQuotaType = resourceQuotaType; + Name = name; + Limit = limit; + Unit = unit; + } + + /// + /// Specifies the resource ID. + /// Serialized Name: ResourceQuota.id + /// + public string Id { get; } + /// + /// Region of the AML workspace in the id. + /// Serialized Name: ResourceQuota.amlWorkspaceLocation + /// + public string AmlWorkspaceLocation { get; } + /// + /// Specifies the resource type. + /// Serialized Name: ResourceQuota.type + /// + public string ResourceQuotaType { get; } + /// + /// Name of the resource. + /// Serialized Name: ResourceQuota.name + /// + public MachineLearningResourceName Name { get; } + /// + /// The maximum permitted quota of the resource. + /// Serialized Name: ResourceQuota.limit + /// + public long? Limit { get; } + /// + /// An enum describing the unit of quota measurement. + /// Serialized Name: ResourceQuota.unit + /// + public MachineLearningQuotaUnit? Unit { get; } + } +} 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 new file mode 100644 index 000000000000..c4b76bea148d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSasAuthTypeWorkspaceConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningSasAuthTypeWorkspaceConnection DeserializeMachineLearningSasAuthTypeWorkspaceConnection(JsonElement element) + { + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional target = default; + Optional value = default; + Optional valueFormat = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + credentials = WorkspaceConnectionSharedAccessSignature.DeserializeWorkspaceConnectionSharedAccessSignature(property.Value); + continue; + } + if (property.NameEquals("authType")) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueFormat")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + continue; + } + } + return new MachineLearningSasAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs new file mode 100644 index 000000000000..ffee2d8a49e2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasAuthTypeWorkspaceConnection.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningSasAuthTypeWorkspaceConnection. + /// Serialized Name: SASAuthTypeWorkspaceConnectionProperties + /// + public partial class MachineLearningSasAuthTypeWorkspaceConnection : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of MachineLearningSasAuthTypeWorkspaceConnection. + public MachineLearningSasAuthTypeWorkspaceConnection() + { + AuthType = MachineLearningConnectionAuthType.Sas; + } + + /// Initializes a new instance of MachineLearningSasAuthTypeWorkspaceConnection. + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + /// Serialized Name: SASAuthTypeWorkspaceConnectionProperties.credentials. + internal MachineLearningSasAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, WorkspaceConnectionSharedAccessSignature credentials) : base(authType, category, target, value, valueFormat) + { + Credentials = credentials; + AuthType = authType; + } + + /// Serialized Name: SASAuthTypeWorkspaceConnectionProperties.credentials. + internal WorkspaceConnectionSharedAccessSignature Credentials { get; set; } + /// Serialized Name: WorkspaceConnectionSharedAccessSignature.sas. + public string CredentialsSas + { + get => Credentials is null ? default : Credentials.Sas; + set + { + if (Credentials is null) + Credentials = new WorkspaceConnectionSharedAccessSignature(); + Credentials.Sas = value; + } + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreCredentials.Serialization.cs new file mode 100644 index 000000000000..6e91ab1d8132 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreCredentials.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSasDatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("secrets"); + writer.WriteObjectValue(Secrets); + writer.WritePropertyName("credentialsType"); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningSasDatastoreCredentials DeserializeMachineLearningSasDatastoreCredentials(JsonElement element) + { + MachineLearningSasDatastoreSecrets secrets = default; + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secrets")) + { + secrets = MachineLearningSasDatastoreSecrets.DeserializeMachineLearningSasDatastoreSecrets(property.Value); + continue; + } + if (property.NameEquals("credentialsType")) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningSasDatastoreCredentials(credentialsType, secrets); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreCredentials.cs new file mode 100644 index 000000000000..491de173dbf5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreCredentials.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// SAS datastore credentials configuration. + /// Serialized Name: SasDatastoreCredentials + /// + public partial class MachineLearningSasDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of MachineLearningSasDatastoreCredentials. + /// + /// [Required] Storage container secrets. + /// Serialized Name: SasDatastoreCredentials.secrets + /// + /// is null. + public MachineLearningSasDatastoreCredentials(MachineLearningSasDatastoreSecrets secrets) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + + Secrets = secrets; + CredentialsType = CredentialsType.Sas; + } + + /// Initializes a new instance of MachineLearningSasDatastoreCredentials. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + /// + /// [Required] Storage container secrets. + /// Serialized Name: SasDatastoreCredentials.secrets + /// + internal MachineLearningSasDatastoreCredentials(CredentialsType credentialsType, MachineLearningSasDatastoreSecrets secrets) : base(credentialsType) + { + Secrets = secrets; + CredentialsType = credentialsType; + } + + /// + /// [Required] Storage container secrets. + /// Serialized Name: SasDatastoreCredentials.secrets + /// + public MachineLearningSasDatastoreSecrets Secrets { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreSecrets.Serialization.cs new file mode 100644 index 000000000000..d97148a60205 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreSecrets.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSasDatastoreSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(SasToken)) + { + if (SasToken != null) + { + writer.WritePropertyName("sasToken"); + writer.WriteStringValue(SasToken); + } + else + { + writer.WriteNull("sasToken"); + } + } + writer.WritePropertyName("secretsType"); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningSasDatastoreSecrets DeserializeMachineLearningSasDatastoreSecrets(JsonElement element) + { + Optional sasToken = default; + SecretsType secretsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sasToken")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sasToken = null; + continue; + } + sasToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretsType")) + { + secretsType = new SecretsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningSasDatastoreSecrets(secretsType, sasToken.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreSecrets.cs new file mode 100644 index 000000000000..d9862167c137 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSasDatastoreSecrets.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Datastore SAS secrets. + /// Serialized Name: SasDatastoreSecrets + /// + public partial class MachineLearningSasDatastoreSecrets : MachineLearningDatastoreSecrets + { + /// Initializes a new instance of MachineLearningSasDatastoreSecrets. + public MachineLearningSasDatastoreSecrets() + { + SecretsType = SecretsType.Sas; + } + + /// Initializes a new instance of MachineLearningSasDatastoreSecrets. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// + /// + /// Storage container SAS token. + /// Serialized Name: SasDatastoreSecrets.sasToken + /// + internal MachineLearningSasDatastoreSecrets(SecretsType secretsType, string sasToken) : base(secretsType) + { + SasToken = sasToken; + SecretsType = secretsType; + } + + /// + /// Storage container SAS token. + /// Serialized Name: SasDatastoreSecrets.sasToken + /// + public string SasToken { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs new file mode 100644 index 000000000000..720560d81ada --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.Serialization.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningScheduleAction : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("actionType"); + writer.WriteStringValue(ActionType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningScheduleAction DeserializeMachineLearningScheduleAction(JsonElement element) + { + if (element.TryGetProperty("actionType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CreateJob": return MachineLearningJobScheduleAction.DeserializeMachineLearningJobScheduleAction(element); + case "InvokeBatchEndpoint": return MachineLearningEndpointScheduleAction.DeserializeMachineLearningEndpointScheduleAction(element); + } + } + return UnknownScheduleActionBase.DeserializeUnknownScheduleActionBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs new file mode 100644 index 000000000000..4c9dd2a4c5ed --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleAction.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningScheduleAction. + /// Serialized Name: ScheduleActionBase + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningScheduleAction + { + /// Initializes a new instance of MachineLearningScheduleAction. + protected MachineLearningScheduleAction() + { + } + + /// Initializes a new instance of MachineLearningScheduleAction. + /// + /// [Required] Specifies the action type of the schedule + /// Serialized Name: ScheduleActionBase.actionType + /// + internal MachineLearningScheduleAction(ScheduleActionType actionType) + { + ActionType = actionType; + } + + /// + /// [Required] Specifies the action type of the schedule + /// Serialized Name: ScheduleActionBase.actionType + /// + internal ScheduleActionType ActionType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs new file mode 100644 index 000000000000..4dbae0fa4f5a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningScheduleBase + { + internal static MachineLearningScheduleBase DeserializeMachineLearningScheduleBase(JsonElement element) + { + Optional id = default; + Optional provisioningStatus = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + id = null; + continue; + } + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningStatus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningStatus = new MachineLearningScheduleProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningScheduleStatus(property.Value.GetString()); + continue; + } + } + return new MachineLearningScheduleBase(id.Value, Optional.ToNullable(provisioningStatus), Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs new file mode 100644 index 000000000000..9c66221d1fbf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleBase.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningScheduleBase. + /// Serialized Name: ScheduleBase + /// + public partial class MachineLearningScheduleBase + { + /// Initializes a new instance of MachineLearningScheduleBase. + internal MachineLearningScheduleBase() + { + } + + /// Initializes a new instance of MachineLearningScheduleBase. + /// + /// A system assigned id for the schedule. + /// Serialized Name: ScheduleBase.id + /// + /// + /// The current deployment state of schedule. + /// Serialized Name: ScheduleBase.provisioningStatus + /// + /// + /// Is the schedule enabled or disabled? + /// Serialized Name: ScheduleBase.status + /// + internal MachineLearningScheduleBase(string id, MachineLearningScheduleProvisioningState? provisioningStatus, MachineLearningScheduleStatus? status) + { + Id = id; + ProvisioningStatus = provisioningStatus; + Status = status; + } + + /// + /// A system assigned id for the schedule. + /// Serialized Name: ScheduleBase.id + /// + public string Id { get; } + /// + /// The current deployment state of schedule. + /// Serialized Name: ScheduleBase.provisioningStatus + /// + public MachineLearningScheduleProvisioningState? ProvisioningStatus { get; } + /// + /// Is the schedule enabled or disabled? + /// Serialized Name: ScheduleBase.status + /// + public MachineLearningScheduleStatus? Status { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleData.Serialization.cs new file mode 100644 index 000000000000..f0d77ef4e705 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningScheduleData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningScheduleData DeserializeMachineLearningScheduleData(JsonElement element) + { + MachineLearningScheduleProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningScheduleProperties.DeserializeMachineLearningScheduleProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningScheduleData(id, name, type, systemData.Value, properties); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleListViewType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleListViewType.cs new file mode 100644 index 000000000000..28ec5a9ed8dd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleListViewType.cs @@ -0,0 +1,66 @@ +// 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 MachineLearningScheduleListViewType. + /// Serialized Name: ScheduleListViewType + /// + public readonly partial struct MachineLearningScheduleListViewType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningScheduleListViewType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledOnlyValue = "EnabledOnly"; + private const string DisabledOnlyValue = "DisabledOnly"; + private const string AllValue = "All"; + + /// + /// EnabledOnly + /// Serialized Name: ScheduleListViewType.EnabledOnly + /// + public static MachineLearningScheduleListViewType EnabledOnly { get; } = new MachineLearningScheduleListViewType(EnabledOnlyValue); + /// + /// DisabledOnly + /// Serialized Name: ScheduleListViewType.DisabledOnly + /// + public static MachineLearningScheduleListViewType DisabledOnly { get; } = new MachineLearningScheduleListViewType(DisabledOnlyValue); + /// + /// All + /// Serialized Name: ScheduleListViewType.All + /// + public static MachineLearningScheduleListViewType All { get; } = new MachineLearningScheduleListViewType(AllValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningScheduleListViewType left, MachineLearningScheduleListViewType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningScheduleListViewType left, MachineLearningScheduleListViewType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningScheduleListViewType(string value) => new MachineLearningScheduleListViewType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningScheduleListViewType other && Equals(other); + /// + public bool Equals(MachineLearningScheduleListViewType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..42efc9d29d0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.Serialization.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningScheduleProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("action"); + writer.WriteObjectValue(Action); + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(IsEnabled)) + { + writer.WritePropertyName("isEnabled"); + writer.WriteBooleanValue(IsEnabled.Value); + } + writer.WritePropertyName("trigger"); + writer.WriteObjectValue(Trigger); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningScheduleProperties DeserializeMachineLearningScheduleProperties(JsonElement element) + { + MachineLearningScheduleAction action = default; + Optional displayName = default; + Optional isEnabled = default; + Optional provisioningState = default; + MachineLearningTriggerBase trigger = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("action")) + { + action = MachineLearningScheduleAction.DeserializeMachineLearningScheduleAction(property.Value); + continue; + } + if (property.NameEquals("displayName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isEnabled")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningScheduleProvisioningStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("trigger")) + { + trigger = MachineLearningTriggerBase.DeserializeMachineLearningTriggerBase(property.Value); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningScheduleProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), action, displayName.Value, Optional.ToNullable(isEnabled), Optional.ToNullable(provisioningState), trigger); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs new file mode 100644 index 000000000000..8fa3a12a8ab4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProperties.cs @@ -0,0 +1,119 @@ +// 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 +{ + /// + /// Base definition of a schedule + /// Serialized Name: ScheduleProperties + /// + public partial class MachineLearningScheduleProperties : MachineLearningResourceBase + { + /// Initializes a new instance of MachineLearningScheduleProperties. + /// + /// [Required] Specifies the action of the schedule + /// Serialized Name: ScheduleProperties.action + /// Please note is the base class. According to the scenario, a derived class 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 + /// Serialized Name: ScheduleProperties.trigger + /// Please note is the base class. According to the scenario, a derived class 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(action, nameof(action)); + Argument.AssertNotNull(trigger, nameof(trigger)); + + Action = action; + Trigger = trigger; + } + + /// Initializes a new instance of MachineLearningScheduleProperties. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// [Required] Specifies the action of the schedule + /// Serialized Name: ScheduleProperties.action + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: ScheduleProperties.displayName + /// + /// + /// Is the schedule enabled? + /// Serialized Name: ScheduleProperties.isEnabled + /// + /// + /// Provisioning state for the schedule. + /// Serialized Name: ScheduleProperties.provisioningState + /// + /// + /// [Required] Specifies the trigger details + /// Serialized Name: ScheduleProperties.trigger + /// Please note is the base class. According to the scenario, a derived class 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, MachineLearningScheduleAction action, string displayName, bool? isEnabled, MachineLearningScheduleProvisioningStatus? provisioningState, MachineLearningTriggerBase trigger) : base(description, properties, tags) + { + Action = action; + DisplayName = displayName; + IsEnabled = isEnabled; + ProvisioningState = provisioningState; + Trigger = trigger; + } + + /// + /// [Required] Specifies the action of the schedule + /// Serialized Name: ScheduleProperties.action + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: ScheduleProperties.displayName + /// + public string DisplayName { get; set; } + /// + /// Is the schedule enabled? + /// Serialized Name: ScheduleProperties.isEnabled + /// + public bool? IsEnabled { get; set; } + /// + /// Provisioning state for the schedule. + /// Serialized Name: ScheduleProperties.provisioningState + /// + public MachineLearningScheduleProvisioningStatus? ProvisioningState { get; } + /// + /// [Required] Specifies the trigger details + /// Serialized Name: ScheduleProperties.trigger + /// Please note is the base class. According to the scenario, a derived class 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; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProvisioningState.cs new file mode 100644 index 000000000000..4ab5310ea68f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProvisioningState.cs @@ -0,0 +1,66 @@ +// 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 current deployment state of schedule. + /// Serialized Name: ScheduleProvisioningState + /// + public readonly partial struct MachineLearningScheduleProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningScheduleProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CompletedValue = "Completed"; + private const string ProvisioningValue = "Provisioning"; + private const string FailedValue = "Failed"; + + /// + /// Completed + /// Serialized Name: ScheduleProvisioningState.Completed + /// + public static MachineLearningScheduleProvisioningState Completed { get; } = new MachineLearningScheduleProvisioningState(CompletedValue); + /// + /// Provisioning + /// Serialized Name: ScheduleProvisioningState.Provisioning + /// + public static MachineLearningScheduleProvisioningState Provisioning { get; } = new MachineLearningScheduleProvisioningState(ProvisioningValue); + /// + /// Failed + /// Serialized Name: ScheduleProvisioningState.Failed + /// + public static MachineLearningScheduleProvisioningState Failed { get; } = new MachineLearningScheduleProvisioningState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningScheduleProvisioningState left, MachineLearningScheduleProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningScheduleProvisioningState left, MachineLearningScheduleProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningScheduleProvisioningState(string value) => new MachineLearningScheduleProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningScheduleProvisioningState other && Equals(other); + /// + public bool Equals(MachineLearningScheduleProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProvisioningStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProvisioningStatus.cs new file mode 100644 index 000000000000..a03f4d9c9de6 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleProvisioningStatus.cs @@ -0,0 +1,84 @@ +// 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 MachineLearningScheduleProvisioningStatus. + /// Serialized Name: ScheduleProvisioningStatus + /// + public readonly partial struct MachineLearningScheduleProvisioningStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningScheduleProvisioningStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string DeletingValue = "Deleting"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CanceledValue = "Canceled"; + + /// + /// Creating + /// Serialized Name: ScheduleProvisioningStatus.Creating + /// + public static MachineLearningScheduleProvisioningStatus Creating { get; } = new MachineLearningScheduleProvisioningStatus(CreatingValue); + /// + /// Updating + /// Serialized Name: ScheduleProvisioningStatus.Updating + /// + public static MachineLearningScheduleProvisioningStatus Updating { get; } = new MachineLearningScheduleProvisioningStatus(UpdatingValue); + /// + /// Deleting + /// Serialized Name: ScheduleProvisioningStatus.Deleting + /// + public static MachineLearningScheduleProvisioningStatus Deleting { get; } = new MachineLearningScheduleProvisioningStatus(DeletingValue); + /// + /// Succeeded + /// Serialized Name: ScheduleProvisioningStatus.Succeeded + /// + public static MachineLearningScheduleProvisioningStatus Succeeded { get; } = new MachineLearningScheduleProvisioningStatus(SucceededValue); + /// + /// Failed + /// Serialized Name: ScheduleProvisioningStatus.Failed + /// + public static MachineLearningScheduleProvisioningStatus Failed { get; } = new MachineLearningScheduleProvisioningStatus(FailedValue); + /// + /// Canceled + /// Serialized Name: ScheduleProvisioningStatus.Canceled + /// + public static MachineLearningScheduleProvisioningStatus Canceled { get; } = new MachineLearningScheduleProvisioningStatus(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningScheduleProvisioningStatus left, MachineLearningScheduleProvisioningStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningScheduleProvisioningStatus left, MachineLearningScheduleProvisioningStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningScheduleProvisioningStatus(string value) => new MachineLearningScheduleProvisioningStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningScheduleProvisioningStatus other && Equals(other); + /// + public bool Equals(MachineLearningScheduleProvisioningStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleStatus.cs new file mode 100644 index 000000000000..e4a688ede012 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScheduleStatus.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Is the schedule enabled or disabled? + /// Serialized Name: ScheduleStatus + /// + public readonly partial struct MachineLearningScheduleStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningScheduleStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// + /// Enabled + /// Serialized Name: ScheduleStatus.Enabled + /// + public static MachineLearningScheduleStatus Enabled { get; } = new MachineLearningScheduleStatus(EnabledValue); + /// + /// Disabled + /// Serialized Name: ScheduleStatus.Disabled + /// + public static MachineLearningScheduleStatus Disabled { get; } = new MachineLearningScheduleStatus(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningScheduleStatus left, MachineLearningScheduleStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningScheduleStatus left, MachineLearningScheduleStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningScheduleStatus(string value) => new MachineLearningScheduleStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningScheduleStatus other && Equals(other); + /// + public bool Equals(MachineLearningScheduleStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.Serialization.cs new file mode 100644 index 000000000000..3a08ac53f5d2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningScriptReference : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ScriptSource)) + { + writer.WritePropertyName("scriptSource"); + writer.WriteStringValue(ScriptSource); + } + if (Optional.IsDefined(ScriptData)) + { + writer.WritePropertyName("scriptData"); + writer.WriteStringValue(ScriptData); + } + if (Optional.IsDefined(ScriptArguments)) + { + writer.WritePropertyName("scriptArguments"); + writer.WriteStringValue(ScriptArguments); + } + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout); + } + writer.WriteEndObject(); + } + + internal static MachineLearningScriptReference DeserializeMachineLearningScriptReference(JsonElement element) + { + Optional scriptSource = default; + Optional scriptData = default; + Optional scriptArguments = default; + Optional timeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scriptSource")) + { + scriptSource = property.Value.GetString(); + continue; + } + if (property.NameEquals("scriptData")) + { + scriptData = property.Value.GetString(); + continue; + } + if (property.NameEquals("scriptArguments")) + { + scriptArguments = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeout")) + { + timeout = property.Value.GetString(); + continue; + } + } + return new MachineLearningScriptReference(scriptSource.Value, scriptData.Value, scriptArguments.Value, timeout.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs new file mode 100644 index 000000000000..631af389dd11 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptReference.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Script reference + /// Serialized Name: ScriptReference + /// + public partial class MachineLearningScriptReference + { + /// Initializes a new instance of MachineLearningScriptReference. + public MachineLearningScriptReference() + { + } + + /// Initializes a new instance of MachineLearningScriptReference. + /// + /// The storage source of the script: workspace. + /// Serialized Name: ScriptReference.scriptSource + /// + /// + /// The location of scripts in the mounted volume. + /// Serialized Name: ScriptReference.scriptData + /// + /// + /// Optional command line arguments passed to the script to run. + /// Serialized Name: ScriptReference.scriptArguments + /// + /// + /// Optional time period passed to timeout command. + /// Serialized Name: ScriptReference.timeout + /// + internal MachineLearningScriptReference(string scriptSource, string scriptData, string scriptArguments, string timeout) + { + ScriptSource = scriptSource; + ScriptData = scriptData; + ScriptArguments = scriptArguments; + Timeout = timeout; + } + + /// + /// The storage source of the script: workspace. + /// Serialized Name: ScriptReference.scriptSource + /// + public string ScriptSource { get; set; } + /// + /// The location of scripts in the mounted volume. + /// Serialized Name: ScriptReference.scriptData + /// + public string ScriptData { get; set; } + /// + /// Optional command line arguments passed to the script to run. + /// Serialized Name: ScriptReference.scriptArguments + /// + public string ScriptArguments { get; set; } + /// + /// Optional time period passed to timeout command. + /// Serialized Name: ScriptReference.timeout + /// + public string Timeout { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptsToExecute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptsToExecute.Serialization.cs new file mode 100644 index 000000000000..163c02cca567 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptsToExecute.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningScriptsToExecute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StartupScript)) + { + writer.WritePropertyName("startupScript"); + writer.WriteObjectValue(StartupScript); + } + if (Optional.IsDefined(CreationScript)) + { + writer.WritePropertyName("creationScript"); + writer.WriteObjectValue(CreationScript); + } + writer.WriteEndObject(); + } + + internal static MachineLearningScriptsToExecute DeserializeMachineLearningScriptsToExecute(JsonElement element) + { + Optional startupScript = default; + Optional creationScript = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startupScript")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + startupScript = MachineLearningScriptReference.DeserializeMachineLearningScriptReference(property.Value); + continue; + } + if (property.NameEquals("creationScript")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + creationScript = MachineLearningScriptReference.DeserializeMachineLearningScriptReference(property.Value); + continue; + } + } + return new MachineLearningScriptsToExecute(startupScript.Value, creationScript.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptsToExecute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptsToExecute.cs new file mode 100644 index 000000000000..43b62d262a29 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningScriptsToExecute.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Customized setup scripts + /// Serialized Name: ScriptsToExecute + /// + public partial class MachineLearningScriptsToExecute + { + /// Initializes a new instance of MachineLearningScriptsToExecute. + public MachineLearningScriptsToExecute() + { + } + + /// Initializes a new instance of MachineLearningScriptsToExecute. + /// + /// Script that's run every time the machine starts. + /// Serialized Name: ScriptsToExecute.startupScript + /// + /// + /// Script that's run only once during provision of the compute. + /// Serialized Name: ScriptsToExecute.creationScript + /// + internal MachineLearningScriptsToExecute(MachineLearningScriptReference startupScript, MachineLearningScriptReference creationScript) + { + StartupScript = startupScript; + CreationScript = creationScript; + } + + /// + /// Script that's run every time the machine starts. + /// Serialized Name: ScriptsToExecute.startupScript + /// + public MachineLearningScriptReference StartupScript { get; set; } + /// + /// Script that's run only once during provision of the compute. + /// Serialized Name: ScriptsToExecute.creationScript + /// + public MachineLearningScriptReference CreationScript { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServiceDataAccessAuthIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServiceDataAccessAuthIdentity.cs new file mode 100644 index 000000000000..6f3b2f494fb2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServiceDataAccessAuthIdentity.cs @@ -0,0 +1,66 @@ +// 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 MachineLearningServiceDataAccessAuthIdentity. + /// Serialized Name: ServiceDataAccessAuthIdentity + /// + public readonly partial struct MachineLearningServiceDataAccessAuthIdentity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningServiceDataAccessAuthIdentity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string WorkspaceSystemAssignedIdentityValue = "WorkspaceSystemAssignedIdentity"; + private const string WorkspaceUserAssignedIdentityValue = "WorkspaceUserAssignedIdentity"; + + /// + /// Do not use any identity for service data access. + /// Serialized Name: ServiceDataAccessAuthIdentity.None + /// + public static MachineLearningServiceDataAccessAuthIdentity None { get; } = new MachineLearningServiceDataAccessAuthIdentity(NoneValue); + /// + /// Use the system assigned managed identity of the Workspace to authenticate service data access. + /// Serialized Name: ServiceDataAccessAuthIdentity.WorkspaceSystemAssignedIdentity + /// + public static MachineLearningServiceDataAccessAuthIdentity WorkspaceSystemAssignedIdentity { get; } = new MachineLearningServiceDataAccessAuthIdentity(WorkspaceSystemAssignedIdentityValue); + /// + /// Use the user assigned managed identity of the Workspace to authenticate service data access. + /// Serialized Name: ServiceDataAccessAuthIdentity.WorkspaceUserAssignedIdentity + /// + public static MachineLearningServiceDataAccessAuthIdentity WorkspaceUserAssignedIdentity { get; } = new MachineLearningServiceDataAccessAuthIdentity(WorkspaceUserAssignedIdentityValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningServiceDataAccessAuthIdentity left, MachineLearningServiceDataAccessAuthIdentity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningServiceDataAccessAuthIdentity left, MachineLearningServiceDataAccessAuthIdentity right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningServiceDataAccessAuthIdentity(string value) => new MachineLearningServiceDataAccessAuthIdentity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningServiceDataAccessAuthIdentity other && Equals(other); + /// + public bool Equals(MachineLearningServiceDataAccessAuthIdentity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..5a5e52752c0e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.Serialization.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningServicePrincipalDatastoreCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AuthorityUri)) + { + if (AuthorityUri != null) + { + writer.WritePropertyName("authorityUrl"); + writer.WriteStringValue(AuthorityUri.AbsoluteUri); + } + else + { + writer.WriteNull("authorityUrl"); + } + } + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId); + if (Optional.IsDefined(ResourceUri)) + { + if (ResourceUri != null) + { + writer.WritePropertyName("resourceUrl"); + writer.WriteStringValue(ResourceUri.AbsoluteUri); + } + else + { + writer.WriteNull("resourceUrl"); + } + } + writer.WritePropertyName("secrets"); + writer.WriteObjectValue(Secrets); + writer.WritePropertyName("tenantId"); + writer.WriteStringValue(TenantId); + writer.WritePropertyName("credentialsType"); + writer.WriteStringValue(CredentialsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningServicePrincipalDatastoreCredentials DeserializeMachineLearningServicePrincipalDatastoreCredentials(JsonElement element) + { + Optional authorityUrl = default; + Guid clientId = default; + Optional resourceUrl = default; + MachineLearningServicePrincipalDatastoreSecrets secrets = default; + Guid tenantId = default; + CredentialsType credentialsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authorityUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + authorityUrl = null; + continue; + } + authorityUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("resourceUrl")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceUrl = null; + continue; + } + resourceUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("secrets")) + { + secrets = MachineLearningServicePrincipalDatastoreSecrets.DeserializeMachineLearningServicePrincipalDatastoreSecrets(property.Value); + continue; + } + if (property.NameEquals("tenantId")) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("credentialsType")) + { + credentialsType = new CredentialsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningServicePrincipalDatastoreCredentials(credentialsType, authorityUrl.Value, clientId, resourceUrl.Value, secrets, tenantId); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs new file mode 100644 index 000000000000..f79cadf97977 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreCredentials.cs @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Service Principal datastore credentials configuration. + /// Serialized Name: ServicePrincipalDatastoreCredentials + /// + public partial class MachineLearningServicePrincipalDatastoreCredentials : MachineLearningDatastoreCredentials + { + /// Initializes a new instance of MachineLearningServicePrincipalDatastoreCredentials. + /// + /// [Required] Service principal client ID. + /// Serialized Name: ServicePrincipalDatastoreCredentials.clientId + /// + /// + /// [Required] Service principal secrets. + /// Serialized Name: ServicePrincipalDatastoreCredentials.secrets + /// + /// + /// [Required] ID of the tenant to which the service principal belongs. + /// Serialized Name: ServicePrincipalDatastoreCredentials.tenantId + /// + /// is null. + public MachineLearningServicePrincipalDatastoreCredentials(Guid clientId, MachineLearningServicePrincipalDatastoreSecrets secrets, Guid tenantId) + { + Argument.AssertNotNull(secrets, nameof(secrets)); + + ClientId = clientId; + Secrets = secrets; + TenantId = tenantId; + CredentialsType = CredentialsType.ServicePrincipal; + } + + /// Initializes a new instance of MachineLearningServicePrincipalDatastoreCredentials. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// + /// + /// Authority URL used for authentication. + /// Serialized Name: ServicePrincipalDatastoreCredentials.authorityUrl + /// + /// + /// [Required] Service principal client ID. + /// Serialized Name: ServicePrincipalDatastoreCredentials.clientId + /// + /// + /// Resource the service principal has access to. + /// Serialized Name: ServicePrincipalDatastoreCredentials.resourceUrl + /// + /// + /// [Required] Service principal secrets. + /// Serialized Name: ServicePrincipalDatastoreCredentials.secrets + /// + /// + /// [Required] ID of the tenant to which the service principal belongs. + /// Serialized Name: ServicePrincipalDatastoreCredentials.tenantId + /// + internal MachineLearningServicePrincipalDatastoreCredentials(CredentialsType credentialsType, Uri authorityUri, Guid clientId, Uri resourceUri, MachineLearningServicePrincipalDatastoreSecrets secrets, Guid tenantId) : base(credentialsType) + { + AuthorityUri = authorityUri; + ClientId = clientId; + ResourceUri = resourceUri; + Secrets = secrets; + TenantId = tenantId; + CredentialsType = credentialsType; + } + + /// + /// Authority URL used for authentication. + /// Serialized Name: ServicePrincipalDatastoreCredentials.authorityUrl + /// + public Uri AuthorityUri { get; set; } + /// + /// [Required] Service principal client ID. + /// Serialized Name: ServicePrincipalDatastoreCredentials.clientId + /// + public Guid ClientId { get; set; } + /// + /// Resource the service principal has access to. + /// Serialized Name: ServicePrincipalDatastoreCredentials.resourceUrl + /// + public Uri ResourceUri { get; set; } + /// + /// [Required] Service principal secrets. + /// Serialized Name: ServicePrincipalDatastoreCredentials.secrets + /// + public MachineLearningServicePrincipalDatastoreSecrets Secrets { get; set; } + /// + /// [Required] ID of the tenant to which the service principal belongs. + /// Serialized Name: ServicePrincipalDatastoreCredentials.tenantId + /// + public Guid TenantId { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreSecrets.Serialization.cs new file mode 100644 index 000000000000..32d54440fc00 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreSecrets.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningServicePrincipalDatastoreSecrets : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ClientSecret)) + { + if (ClientSecret != null) + { + writer.WritePropertyName("clientSecret"); + writer.WriteStringValue(ClientSecret); + } + else + { + writer.WriteNull("clientSecret"); + } + } + writer.WritePropertyName("secretsType"); + writer.WriteStringValue(SecretsType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningServicePrincipalDatastoreSecrets DeserializeMachineLearningServicePrincipalDatastoreSecrets(JsonElement element) + { + Optional clientSecret = default; + SecretsType secretsType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientSecret")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + clientSecret = null; + continue; + } + clientSecret = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretsType")) + { + secretsType = new SecretsType(property.Value.GetString()); + continue; + } + } + return new MachineLearningServicePrincipalDatastoreSecrets(secretsType, clientSecret.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreSecrets.cs new file mode 100644 index 000000000000..3e3a6808dac3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningServicePrincipalDatastoreSecrets.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Datastore Service Principal secrets. + /// Serialized Name: ServicePrincipalDatastoreSecrets + /// + public partial class MachineLearningServicePrincipalDatastoreSecrets : MachineLearningDatastoreSecrets + { + /// Initializes a new instance of MachineLearningServicePrincipalDatastoreSecrets. + public MachineLearningServicePrincipalDatastoreSecrets() + { + SecretsType = SecretsType.ServicePrincipal; + } + + /// Initializes a new instance of MachineLearningServicePrincipalDatastoreSecrets. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// + /// + /// Service principal secret. + /// Serialized Name: ServicePrincipalDatastoreSecrets.clientSecret + /// + internal MachineLearningServicePrincipalDatastoreSecrets(SecretsType secretsType, string clientSecret) : base(secretsType) + { + ClientSecret = clientSecret; + SecretsType = secretsType; + } + + /// + /// Service principal secret. + /// Serialized Name: ServicePrincipalDatastoreSecrets.clientSecret + /// + public string ClientSecret { 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 new file mode 100644 index 000000000000..118ac036ea63 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.Serialization.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSharedPrivateLinkResource : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + writer.WritePropertyName("properties"); + writer.WriteStartObject(); + if (Optional.IsDefined(PrivateLinkResourceId)) + { + writer.WritePropertyName("privateLinkResourceId"); + writer.WriteStringValue(PrivateLinkResourceId); + } + if (Optional.IsDefined(GroupId)) + { + writer.WritePropertyName("groupId"); + writer.WriteStringValue(GroupId); + } + if (Optional.IsDefined(RequestMessage)) + { + writer.WritePropertyName("requestMessage"); + writer.WriteStringValue(RequestMessage); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + writer.WriteEndObject(); + writer.WriteEndObject(); + } + + internal static MachineLearningSharedPrivateLinkResource DeserializeMachineLearningSharedPrivateLinkResource(JsonElement element) + { + Optional name = default; + Optional privateLinkResourceId = default; + Optional groupId = default; + Optional requestMessage = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("privateLinkResourceId")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + privateLinkResourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("groupId")) + { + groupId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requestMessage")) + { + requestMessage = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("status")) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + property0.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningPrivateEndpointServiceConnectionStatus(property0.Value.GetString()); + continue; + } + } + continue; + } + } + return new MachineLearningSharedPrivateLinkResource(name.Value, privateLinkResourceId.Value, groupId.Value, requestMessage.Value, Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs new file mode 100644 index 000000000000..c524cc098740 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSharedPrivateLinkResource.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningSharedPrivateLinkResource. + /// Serialized Name: SharedPrivateLinkResource + /// + public partial class MachineLearningSharedPrivateLinkResource + { + /// Initializes a new instance of MachineLearningSharedPrivateLinkResource. + public MachineLearningSharedPrivateLinkResource() + { + } + + /// Initializes a new instance of MachineLearningSharedPrivateLinkResource. + /// + /// Unique name of the private link. + /// Serialized Name: SharedPrivateLinkResource.name + /// + /// + /// The resource id that private link links to. + /// Serialized Name: SharedPrivateLinkResource.properties.privateLinkResourceId + /// + /// + /// The private link resource group id. + /// Serialized Name: SharedPrivateLinkResource.properties.groupId + /// + /// + /// Request message. + /// Serialized Name: SharedPrivateLinkResource.properties.requestMessage + /// + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// Serialized Name: SharedPrivateLinkResource.properties.status + /// + internal MachineLearningSharedPrivateLinkResource(string name, ResourceIdentifier privateLinkResourceId, string groupId, string requestMessage, MachineLearningPrivateEndpointServiceConnectionStatus? status) + { + Name = name; + PrivateLinkResourceId = privateLinkResourceId; + GroupId = groupId; + RequestMessage = requestMessage; + Status = status; + } + + /// + /// Unique name of the private link. + /// Serialized Name: SharedPrivateLinkResource.name + /// + public string Name { get; set; } + /// + /// The resource id that private link links to. + /// Serialized Name: SharedPrivateLinkResource.properties.privateLinkResourceId + /// + public ResourceIdentifier PrivateLinkResourceId { get; set; } + /// + /// The private link resource group id. + /// Serialized Name: SharedPrivateLinkResource.properties.groupId + /// + public string GroupId { get; set; } + /// + /// Request message. + /// Serialized Name: SharedPrivateLinkResource.properties.requestMessage + /// + public string RequestMessage { get; set; } + /// + /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + /// Serialized Name: SharedPrivateLinkResource.properties.status + /// + public MachineLearningPrivateEndpointServiceConnectionStatus? Status { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningShortSeriesHandlingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningShortSeriesHandlingConfiguration.cs new file mode 100644 index 000000000000..b69487be35ff --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningShortSeriesHandlingConfiguration.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The parameter defining how if AutoML should handle short time series. + /// Serialized Name: ShortSeriesHandlingConfiguration + /// + public readonly partial struct MachineLearningShortSeriesHandlingConfiguration : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningShortSeriesHandlingConfiguration(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string AutoValue = "Auto"; + private const string PadValue = "Pad"; + private const string DropValue = "Drop"; + + /// + /// Represents no/null value. + /// Serialized Name: ShortSeriesHandlingConfiguration.None + /// + public static MachineLearningShortSeriesHandlingConfiguration None { get; } = new MachineLearningShortSeriesHandlingConfiguration(NoneValue); + /// + /// Short series will be padded if there are no long series, otherwise short series will be dropped. + /// Serialized Name: ShortSeriesHandlingConfiguration.Auto + /// + public static MachineLearningShortSeriesHandlingConfiguration Auto { get; } = new MachineLearningShortSeriesHandlingConfiguration(AutoValue); + /// + /// All the short series will be padded. + /// Serialized Name: ShortSeriesHandlingConfiguration.Pad + /// + public static MachineLearningShortSeriesHandlingConfiguration Pad { get; } = new MachineLearningShortSeriesHandlingConfiguration(PadValue); + /// + /// All the short series will be dropped. + /// Serialized Name: ShortSeriesHandlingConfiguration.Drop + /// + public static MachineLearningShortSeriesHandlingConfiguration Drop { get; } = new MachineLearningShortSeriesHandlingConfiguration(DropValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningShortSeriesHandlingConfiguration left, MachineLearningShortSeriesHandlingConfiguration right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningShortSeriesHandlingConfiguration left, MachineLearningShortSeriesHandlingConfiguration right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningShortSeriesHandlingConfiguration(string value) => new MachineLearningShortSeriesHandlingConfiguration(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningShortSeriesHandlingConfiguration other && Equals(other); + /// + public bool Equals(MachineLearningShortSeriesHandlingConfiguration other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSku.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSku.cs index 608259f2bc6c..57a133b21e15 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSku.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSku.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The resource model definition representing SKU. + /// + /// The resource model definition representing SKU + /// Serialized Name: Sku + /// public partial class MachineLearningSku { /// Initializes a new instance of MachineLearningSku. - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// + /// The name of the SKU. Ex - P3. It is typically a letter+number code + /// Serialized Name: Sku.name + /// /// is null. public MachineLearningSku(string name) { @@ -24,11 +30,26 @@ public MachineLearningSku(string name) } /// Initializes a new instance of MachineLearningSku. - /// 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. - /// 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. + /// + /// The name of the SKU. Ex - P3. It is typically a letter+number code + /// Serialized Name: Sku.name + /// + /// + /// 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. + /// Serialized Name: Sku.tier + /// + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// Serialized Name: Sku.size + /// + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// Serialized Name: Sku.family + /// + /// + /// 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. + /// Serialized Name: Sku.capacity + /// internal MachineLearningSku(string name, MachineLearningSkuTier? tier, string size, string family, int? capacity) { Name = name; @@ -38,15 +59,30 @@ internal MachineLearningSku(string name, MachineLearningSkuTier? tier, string si Capacity = capacity; } - /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// + /// The name of the SKU. Ex - P3. It is typically a letter+number code + /// Serialized Name: Sku.name + /// public string Name { 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. + /// + /// 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. + /// Serialized Name: Sku.tier + /// 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. + /// + /// The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + /// Serialized Name: Sku.size + /// public string Size { get; set; } - /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// Serialized Name: Sku.family + /// 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. + /// + /// 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. + /// Serialized Name: Sku.capacity + /// public int? Capacity { 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 new file mode 100644 index 000000000000..93aa65383eb2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSkuCapacity + { + internal static MachineLearningSkuCapacity DeserializeMachineLearningSkuCapacity(JsonElement element) + { + Optional @default = default; + Optional maximum = default; + Optional minimum = default; + Optional scaleType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("default")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + @default = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maximum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maximum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minimum")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minimum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scaleType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + scaleType = new MachineLearningSkuScaleType(property.Value.GetString()); + continue; + } + } + return new MachineLearningSkuCapacity(Optional.ToNullable(@default), Optional.ToNullable(maximum), Optional.ToNullable(minimum), Optional.ToNullable(scaleType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs new file mode 100644 index 000000000000..2ddbe43aee9b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuCapacity.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// SKU capacity information + /// Serialized Name: SkuCapacity + /// + public partial class MachineLearningSkuCapacity + { + /// Initializes a new instance of MachineLearningSkuCapacity. + internal MachineLearningSkuCapacity() + { + } + + /// Initializes a new instance of MachineLearningSkuCapacity. + /// + /// Gets or sets the default capacity. + /// Serialized Name: SkuCapacity.default + /// + /// + /// Gets or sets the maximum. + /// Serialized Name: SkuCapacity.maximum + /// + /// + /// Gets or sets the minimum. + /// Serialized Name: SkuCapacity.minimum + /// + /// + /// Gets or sets the type of the scale. + /// Serialized Name: SkuCapacity.scaleType + /// + internal MachineLearningSkuCapacity(int? @default, int? maximum, int? minimum, MachineLearningSkuScaleType? scaleType) + { + Default = @default; + Maximum = maximum; + Minimum = minimum; + ScaleType = scaleType; + } + + /// + /// Gets or sets the default capacity. + /// Serialized Name: SkuCapacity.default + /// + public int? Default { get; } + /// + /// Gets or sets the maximum. + /// Serialized Name: SkuCapacity.maximum + /// + public int? Maximum { get; } + /// + /// Gets or sets the minimum. + /// Serialized Name: SkuCapacity.minimum + /// + public int? Minimum { get; } + /// + /// Gets or sets the type of the scale. + /// Serialized Name: SkuCapacity.scaleType + /// + 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 new file mode 100644 index 000000000000..2568e33d7306 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSkuDetail + { + internal static MachineLearningSkuDetail DeserializeMachineLearningSkuDetail(JsonElement element) + { + Optional capacity = default; + Optional resourceType = default; + Optional sku = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("capacity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + capacity = null; + continue; + } + capacity = MachineLearningSkuCapacity.DeserializeMachineLearningSkuCapacity(property.Value); + continue; + } + if (property.NameEquals("resourceType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceType = null; + continue; + } + resourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + sku = null; + continue; + } + sku = MachineLearningSkuSetting.DeserializeMachineLearningSkuSetting(property.Value); + continue; + } + } + return new MachineLearningSkuDetail(capacity.Value, resourceType.Value, sku.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs new file mode 100644 index 000000000000..ce37801d7c7f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuDetail.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Fulfills ARM Contract requirement to list all available SKUS for a resource. + /// Serialized Name: SkuResource + /// + public partial class MachineLearningSkuDetail + { + /// Initializes a new instance of MachineLearningSkuDetail. + internal MachineLearningSkuDetail() + { + } + + /// Initializes a new instance of MachineLearningSkuDetail. + /// + /// Gets or sets the Sku Capacity. + /// Serialized Name: SkuResource.capacity + /// + /// + /// The resource type name. + /// Serialized Name: SkuResource.resourceType + /// + /// + /// Gets or sets the Sku. + /// Serialized Name: SkuResource.sku + /// + internal MachineLearningSkuDetail(MachineLearningSkuCapacity capacity, string resourceType, MachineLearningSkuSetting sku) + { + Capacity = capacity; + ResourceType = resourceType; + Sku = sku; + } + + /// + /// Gets or sets the Sku Capacity. + /// Serialized Name: SkuResource.capacity + /// + public MachineLearningSkuCapacity Capacity { get; } + /// + /// The resource type name. + /// Serialized Name: SkuResource.resourceType + /// + public string ResourceType { get; } + /// + /// Gets or sets the Sku. + /// Serialized Name: SkuResource.sku + /// + public MachineLearningSkuSetting Sku { 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 new file mode 100644 index 000000000000..0a27b443a01e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSkuPatch : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"); + writer.WriteNumberValue(Capacity.Value); + } + if (Optional.IsDefined(Family)) + { + writer.WritePropertyName("family"); + writer.WriteStringValue(Family); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Size)) + { + writer.WritePropertyName("size"); + writer.WriteStringValue(Size); + } + if (Optional.IsDefined(Tier)) + { + writer.WritePropertyName("tier"); + writer.WriteStringValue(Tier.Value.ToSerialString()); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs new file mode 100644 index 000000000000..ad1e0515a02e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuPatch.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Common SKU definition. + /// Serialized Name: PartialSku + /// + public partial class MachineLearningSkuPatch + { + /// Initializes a new instance of MachineLearningSkuPatch. + public MachineLearningSkuPatch() + { + } + + /// + /// 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. + /// Serialized Name: PartialSku.capacity + /// + public int? Capacity { get; set; } + /// + /// If the service has different generations of hardware, for the same SKU, then that can be captured here. + /// Serialized Name: PartialSku.family + /// + public string Family { get; set; } + /// + /// The name of the SKU. Ex - P3. It is typically a letter+number code. + /// Serialized Name: PartialSku.name + /// + 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. + /// Serialized Name: PartialSku.size + /// + 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. + /// Serialized Name: PartialSku.tier + /// + public MachineLearningSkuTier? Tier { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuScaleType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuScaleType.cs new file mode 100644 index 000000000000..422ee126a698 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuScaleType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Node scaling setting for the compute sku. + /// Serialized Name: SkuScaleType + /// + public readonly partial struct MachineLearningSkuScaleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningSkuScaleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; + private const string NoneValue = "None"; + + /// + /// Automatically scales node count. + /// Serialized Name: SkuScaleType.Automatic + /// + public static MachineLearningSkuScaleType Automatic { get; } = new MachineLearningSkuScaleType(AutomaticValue); + /// + /// Node count scaled upon user request. + /// Serialized Name: SkuScaleType.Manual + /// + public static MachineLearningSkuScaleType Manual { get; } = new MachineLearningSkuScaleType(ManualValue); + /// + /// Fixed set of nodes. + /// Serialized Name: SkuScaleType.None + /// + public static MachineLearningSkuScaleType None { get; } = new MachineLearningSkuScaleType(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningSkuScaleType left, MachineLearningSkuScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningSkuScaleType left, MachineLearningSkuScaleType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningSkuScaleType(string value) => new MachineLearningSkuScaleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningSkuScaleType other && Equals(other); + /// + public bool Equals(MachineLearningSkuScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuSetting.Serialization.cs new file mode 100644 index 000000000000..1554e4086c77 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuSetting.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSkuSetting + { + internal static MachineLearningSkuSetting DeserializeMachineLearningSkuSetting(JsonElement element) + { + string name = default; + Optional tier = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("tier")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + tier = property.Value.GetString().ToMachineLearningSkuTier(); + continue; + } + } + return new MachineLearningSkuSetting(name, Optional.ToNullable(tier)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuSetting.cs new file mode 100644 index 000000000000..941f48180225 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuSetting.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// SkuSetting fulfills the need for stripped down SKU info in ARM contract. + /// Serialized Name: SkuSetting + /// + public partial class MachineLearningSkuSetting + { + /// Initializes a new instance of MachineLearningSkuSetting. + /// + /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. + /// Serialized Name: SkuSetting.name + /// + /// is null. + internal MachineLearningSkuSetting(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of MachineLearningSkuSetting. + /// + /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. + /// Serialized Name: SkuSetting.name + /// + /// + /// 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. + /// Serialized Name: SkuSetting.tier + /// + internal MachineLearningSkuSetting(string name, MachineLearningSkuTier? tier) + { + Name = name; + Tier = tier; + } + + /// + /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. + /// Serialized Name: SkuSetting.name + /// + public string Name { get; } + /// + /// 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. + /// Serialized Name: SkuSetting.tier + /// + public MachineLearningSkuTier? Tier { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuTier.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuTier.cs index ffe189c2b27f..cfba80ece912 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuTier.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSkuTier.cs @@ -7,16 +7,31 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// 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. + /// + /// 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. + /// Serialized Name: SkuTier + /// public enum MachineLearningSkuTier { - /// Free. + /// + /// Free + /// Serialized Name: SkuTier.Free + /// Free, - /// Basic. + /// + /// Basic + /// Serialized Name: SkuTier.Basic + /// Basic, - /// Standard. + /// + /// Standard + /// Serialized Name: SkuTier.Standard + /// Standard, - /// Premium. + /// + /// Premium + /// Serialized Name: SkuTier.Premium + /// Premium } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSourceType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSourceType.cs new file mode 100644 index 000000000000..3235069d89c4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSourceType.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Data source type. + /// Serialized Name: SourceType + /// + public readonly partial struct MachineLearningSourceType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningSourceType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DatasetValue = "Dataset"; + private const string DatastoreValue = "Datastore"; + private const string UriValue = "URI"; + + /// + /// Dataset + /// Serialized Name: SourceType.Dataset + /// + public static MachineLearningSourceType Dataset { get; } = new MachineLearningSourceType(DatasetValue); + /// + /// Datastore + /// Serialized Name: SourceType.Datastore + /// + public static MachineLearningSourceType Datastore { get; } = new MachineLearningSourceType(DatastoreValue); + /// + /// URI + /// Serialized Name: SourceType.URI + /// + public static MachineLearningSourceType Uri { get; } = new MachineLearningSourceType(UriValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningSourceType left, MachineLearningSourceType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningSourceType left, MachineLearningSourceType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningSourceType(string value) => new MachineLearningSourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningSourceType other && Equals(other); + /// + public bool Equals(MachineLearningSourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSshPublicAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSshPublicAccess.cs new file mode 100644 index 000000000000..0bb206104ed8 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSshPublicAccess.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. + /// Serialized Name: SshPublicAccess + /// + public readonly partial struct MachineLearningSshPublicAccess : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningSshPublicAccess(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "Enabled"; + private const string DisabledValue = "Disabled"; + + /// + /// Enabled + /// Serialized Name: SshPublicAccess.Enabled + /// + public static MachineLearningSshPublicAccess Enabled { get; } = new MachineLearningSshPublicAccess(EnabledValue); + /// + /// Disabled + /// Serialized Name: SshPublicAccess.Disabled + /// + public static MachineLearningSshPublicAccess Disabled { get; } = new MachineLearningSshPublicAccess(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningSshPublicAccess left, MachineLearningSshPublicAccess right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningSshPublicAccess left, MachineLearningSshPublicAccess right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningSshPublicAccess(string value) => new MachineLearningSshPublicAccess(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningSshPublicAccess other && Equals(other); + /// + public bool Equals(MachineLearningSshPublicAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfigStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfigStatus.cs new file mode 100644 index 000000000000..f67789224f59 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfigStatus.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Enable or disable ssl for scoring + /// Serialized Name: SslConfigStatus + /// + public readonly partial struct MachineLearningSslConfigStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningSslConfigStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DisabledValue = "Disabled"; + private const string EnabledValue = "Enabled"; + private const string AutoValue = "Auto"; + + /// + /// Disabled + /// Serialized Name: SslConfigStatus.Disabled + /// + public static MachineLearningSslConfigStatus Disabled { get; } = new MachineLearningSslConfigStatus(DisabledValue); + /// + /// Enabled + /// Serialized Name: SslConfigStatus.Enabled + /// + public static MachineLearningSslConfigStatus Enabled { get; } = new MachineLearningSslConfigStatus(EnabledValue); + /// + /// Auto + /// Serialized Name: SslConfigStatus.Auto + /// + public static MachineLearningSslConfigStatus Auto { get; } = new MachineLearningSslConfigStatus(AutoValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningSslConfigStatus left, MachineLearningSslConfigStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningSslConfigStatus left, MachineLearningSslConfigStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningSslConfigStatus(string value) => new MachineLearningSslConfigStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningSslConfigStatus other && Equals(other); + /// + public bool Equals(MachineLearningSslConfigStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfiguration.Serialization.cs new file mode 100644 index 000000000000..68486ac797eb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfiguration.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSslConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(Cert)) + { + if (Cert != null) + { + writer.WritePropertyName("cert"); + writer.WriteStringValue(Cert); + } + else + { + writer.WriteNull("cert"); + } + } + if (Optional.IsDefined(Key)) + { + if (Key != null) + { + writer.WritePropertyName("key"); + writer.WriteStringValue(Key); + } + else + { + writer.WriteNull("key"); + } + } + if (Optional.IsDefined(Cname)) + { + if (Cname != null) + { + writer.WritePropertyName("cname"); + writer.WriteStringValue(Cname); + } + else + { + writer.WriteNull("cname"); + } + } + if (Optional.IsDefined(LeafDomainLabel)) + { + if (LeafDomainLabel != null) + { + writer.WritePropertyName("leafDomainLabel"); + writer.WriteStringValue(LeafDomainLabel); + } + else + { + writer.WriteNull("leafDomainLabel"); + } + } + if (Optional.IsDefined(OverwriteExistingDomain)) + { + writer.WritePropertyName("overwriteExistingDomain"); + writer.WriteBooleanValue(OverwriteExistingDomain.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningSslConfiguration DeserializeMachineLearningSslConfiguration(JsonElement element) + { + Optional status = default; + Optional cert = default; + Optional key = default; + Optional cname = default; + Optional leafDomainLabel = default; + Optional overwriteExistingDomain = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningSslConfigStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("cert")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + cert = null; + continue; + } + cert = property.Value.GetString(); + continue; + } + if (property.NameEquals("key")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + key = null; + continue; + } + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("cname")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + cname = null; + continue; + } + cname = property.Value.GetString(); + continue; + } + if (property.NameEquals("leafDomainLabel")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + leafDomainLabel = null; + continue; + } + leafDomainLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("overwriteExistingDomain")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + overwriteExistingDomain = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningSslConfiguration(Optional.ToNullable(status), cert.Value, key.Value, cname.Value, leafDomainLabel.Value, Optional.ToNullable(overwriteExistingDomain)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfiguration.cs new file mode 100644 index 000000000000..e8a7e73cd27a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSslConfiguration.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The ssl configuration for scoring + /// Serialized Name: SslConfiguration + /// + public partial class MachineLearningSslConfiguration + { + /// Initializes a new instance of MachineLearningSslConfiguration. + public MachineLearningSslConfiguration() + { + } + + /// Initializes a new instance of MachineLearningSslConfiguration. + /// + /// Enable or disable ssl for scoring + /// Serialized Name: SslConfiguration.status + /// + /// + /// Cert data + /// Serialized Name: SslConfiguration.cert + /// + /// + /// Key data + /// Serialized Name: SslConfiguration.key + /// + /// + /// CNAME of the cert + /// Serialized Name: SslConfiguration.cname + /// + /// + /// Leaf domain label of public endpoint + /// Serialized Name: SslConfiguration.leafDomainLabel + /// + /// + /// Indicates whether to overwrite existing domain label. + /// Serialized Name: SslConfiguration.overwriteExistingDomain + /// + internal MachineLearningSslConfiguration(MachineLearningSslConfigStatus? status, string cert, string key, string cname, string leafDomainLabel, bool? overwriteExistingDomain) + { + Status = status; + Cert = cert; + Key = key; + Cname = cname; + LeafDomainLabel = leafDomainLabel; + OverwriteExistingDomain = overwriteExistingDomain; + } + + /// + /// Enable or disable ssl for scoring + /// Serialized Name: SslConfiguration.status + /// + public MachineLearningSslConfigStatus? Status { get; set; } + /// + /// Cert data + /// Serialized Name: SslConfiguration.cert + /// + public string Cert { get; set; } + /// + /// Key data + /// Serialized Name: SslConfiguration.key + /// + public string Key { get; set; } + /// + /// CNAME of the cert + /// Serialized Name: SslConfiguration.cname + /// + public string Cname { get; set; } + /// + /// Leaf domain label of public endpoint + /// Serialized Name: SslConfiguration.leafDomainLabel + /// + public string LeafDomainLabel { get; set; } + /// + /// Indicates whether to overwrite existing domain label. + /// Serialized Name: SslConfiguration.overwriteExistingDomain + /// + public bool? OverwriteExistingDomain { 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 new file mode 100644 index 000000000000..54c289496861 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.Serialization.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningStackEnsembleSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(StackMetaLearnerKWargs)) + { + if (StackMetaLearnerKWargs != null) + { + writer.WritePropertyName("stackMetaLearnerKWargs"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(StackMetaLearnerKWargs); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(StackMetaLearnerKWargs.ToString()).RootElement); +#endif + } + else + { + writer.WriteNull("stackMetaLearnerKWargs"); + } + } + if (Optional.IsDefined(StackMetaLearnerTrainPercentage)) + { + writer.WritePropertyName("stackMetaLearnerTrainPercentage"); + writer.WriteNumberValue(StackMetaLearnerTrainPercentage.Value); + } + if (Optional.IsDefined(StackMetaLearnerType)) + { + writer.WritePropertyName("stackMetaLearnerType"); + writer.WriteStringValue(StackMetaLearnerType.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningStackEnsembleSettings DeserializeMachineLearningStackEnsembleSettings(JsonElement element) + { + Optional stackMetaLearnerKWargs = default; + Optional stackMetaLearnerTrainPercentage = default; + Optional stackMetaLearnerType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("stackMetaLearnerKWargs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stackMetaLearnerKWargs = null; + continue; + } + stackMetaLearnerKWargs = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("stackMetaLearnerTrainPercentage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + stackMetaLearnerTrainPercentage = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("stackMetaLearnerType")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + stackMetaLearnerType = new MachineLearningStackMetaLearnerType(property.Value.GetString()); + continue; + } + } + return new MachineLearningStackEnsembleSettings(stackMetaLearnerKWargs.Value, Optional.ToNullable(stackMetaLearnerTrainPercentage), Optional.ToNullable(stackMetaLearnerType)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs new file mode 100644 index 000000000000..0827c8d58c58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackEnsembleSettings.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Advances setting to customize StackEnsemble run. + /// Serialized Name: StackEnsembleSettings + /// + public partial class MachineLearningStackEnsembleSettings + { + /// Initializes a new instance of MachineLearningStackEnsembleSettings. + public MachineLearningStackEnsembleSettings() + { + } + + /// Initializes a new instance of MachineLearningStackEnsembleSettings. + /// + /// Optional parameters to pass to the initializer of the meta-learner. + /// Serialized Name: StackEnsembleSettings.stackMetaLearnerKWargs + /// + /// + /// 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. + /// Serialized Name: StackEnsembleSettings.stackMetaLearnerTrainPercentage + /// + /// + /// The meta-learner is a model trained on the output of the individual heterogeneous models. + /// Serialized Name: StackEnsembleSettings.stackMetaLearnerType + /// + internal MachineLearningStackEnsembleSettings(BinaryData stackMetaLearnerKWargs, double? stackMetaLearnerTrainPercentage, MachineLearningStackMetaLearnerType? stackMetaLearnerType) + { + StackMetaLearnerKWargs = stackMetaLearnerKWargs; + StackMetaLearnerTrainPercentage = stackMetaLearnerTrainPercentage; + StackMetaLearnerType = stackMetaLearnerType; + } + + /// + /// Optional parameters to pass to the initializer of the meta-learner. + /// Serialized Name: StackEnsembleSettings.stackMetaLearnerKWargs + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated 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 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. + /// Serialized Name: StackEnsembleSettings.stackMetaLearnerTrainPercentage + /// + public double? StackMetaLearnerTrainPercentage { get; set; } + /// + /// The meta-learner is a model trained on the output of the individual heterogeneous models. + /// Serialized Name: StackEnsembleSettings.stackMetaLearnerType + /// + public MachineLearningStackMetaLearnerType? StackMetaLearnerType { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackMetaLearnerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackMetaLearnerType.cs new file mode 100644 index 000000000000..8519c50f1f4e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStackMetaLearnerType.cs @@ -0,0 +1,98 @@ +// 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 meta-learner is a model trained on the output of the individual heterogeneous models. + /// Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). + /// This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression + /// Serialized Name: StackMetaLearnerType + /// + public readonly partial struct MachineLearningStackMetaLearnerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningStackMetaLearnerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string LogisticRegressionValue = "LogisticRegression"; + private const string LogisticRegressionCVValue = "LogisticRegressionCV"; + private const string LightGBMClassifierValue = "LightGBMClassifier"; + private const string ElasticNetValue = "ElasticNet"; + private const string ElasticNetCVValue = "ElasticNetCV"; + private const string LightGBMRegressorValue = "LightGBMRegressor"; + private const string LinearRegressionValue = "LinearRegression"; + + /// + /// None + /// Serialized Name: StackMetaLearnerType.None + /// + public static MachineLearningStackMetaLearnerType None { get; } = new MachineLearningStackMetaLearnerType(NoneValue); + /// + /// Default meta-learners are LogisticRegression for classification tasks. + /// Serialized Name: StackMetaLearnerType.LogisticRegression + /// + public static MachineLearningStackMetaLearnerType LogisticRegression { get; } = new MachineLearningStackMetaLearnerType(LogisticRegressionValue); + /// + /// Default meta-learners are LogisticRegression for classification task when CV is on. + /// Serialized Name: StackMetaLearnerType.LogisticRegressionCV + /// + public static MachineLearningStackMetaLearnerType LogisticRegressionCV { get; } = new MachineLearningStackMetaLearnerType(LogisticRegressionCVValue); + /// + /// LightGBMClassifier + /// Serialized Name: StackMetaLearnerType.LightGBMClassifier + /// + public static MachineLearningStackMetaLearnerType LightGBMClassifier { get; } = new MachineLearningStackMetaLearnerType(LightGBMClassifierValue); + /// + /// Default meta-learners are LogisticRegression for regression task. + /// Serialized Name: StackMetaLearnerType.ElasticNet + /// + public static MachineLearningStackMetaLearnerType ElasticNet { get; } = new MachineLearningStackMetaLearnerType(ElasticNetValue); + /// + /// Default meta-learners are LogisticRegression for regression task when CV is on. + /// Serialized Name: StackMetaLearnerType.ElasticNetCV + /// + public static MachineLearningStackMetaLearnerType ElasticNetCV { get; } = new MachineLearningStackMetaLearnerType(ElasticNetCVValue); + /// + /// LightGBMRegressor + /// Serialized Name: StackMetaLearnerType.LightGBMRegressor + /// + public static MachineLearningStackMetaLearnerType LightGBMRegressor { get; } = new MachineLearningStackMetaLearnerType(LightGBMRegressorValue); + /// + /// LinearRegression + /// Serialized Name: StackMetaLearnerType.LinearRegression + /// + public static MachineLearningStackMetaLearnerType LinearRegression { get; } = new MachineLearningStackMetaLearnerType(LinearRegressionValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningStackMetaLearnerType left, MachineLearningStackMetaLearnerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningStackMetaLearnerType left, MachineLearningStackMetaLearnerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningStackMetaLearnerType(string value) => new MachineLearningStackMetaLearnerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningStackMetaLearnerType other && Equals(other); + /// + public bool Equals(MachineLearningStackMetaLearnerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStorageAccountType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStorageAccountType.cs new file mode 100644 index 000000000000..7b06bb74c62a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningStorageAccountType.cs @@ -0,0 +1,60 @@ +// 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 this storage account. + /// Serialized Name: StorageAccountType + /// + public readonly partial struct MachineLearningStorageAccountType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningStorageAccountType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardLrsValue = "Standard_LRS"; + private const string PremiumLrsValue = "Premium_LRS"; + + /// + /// Standard_LRS + /// Serialized Name: StorageAccountType.Standard_LRS + /// + public static MachineLearningStorageAccountType StandardLrs { get; } = new MachineLearningStorageAccountType(StandardLrsValue); + /// + /// Premium_LRS + /// Serialized Name: StorageAccountType.Premium_LRS + /// + public static MachineLearningStorageAccountType PremiumLrs { get; } = new MachineLearningStorageAccountType(PremiumLrsValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningStorageAccountType left, MachineLearningStorageAccountType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningStorageAccountType left, MachineLearningStorageAccountType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningStorageAccountType(string value) => new MachineLearningStorageAccountType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningStorageAccountType other && Equals(other); + /// + public bool Equals(MachineLearningStorageAccountType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..4bb198ad2645 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.Serialization.cs @@ -0,0 +1,472 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSweepJob : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EarlyTermination)) + { + if (EarlyTermination != null) + { + writer.WritePropertyName("earlyTermination"); + writer.WriteObjectValue(EarlyTermination); + } + else + { + writer.WriteNull("earlyTermination"); + } + } + if (Optional.IsCollectionDefined(Inputs)) + { + if (Inputs != null) + { + writer.WritePropertyName("inputs"); + writer.WriteStartObject(); + foreach (var item in Inputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("inputs"); + } + } + if (Optional.IsDefined(Limits)) + { + writer.WritePropertyName("limits"); + writer.WriteObjectValue(Limits); + } + writer.WritePropertyName("objective"); + writer.WriteObjectValue(Objective); + if (Optional.IsCollectionDefined(Outputs)) + { + if (Outputs != null) + { + writer.WritePropertyName("outputs"); + writer.WriteStartObject(); + foreach (var item in Outputs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("outputs"); + } + } + writer.WritePropertyName("samplingAlgorithm"); + writer.WriteObjectValue(SamplingAlgorithm); + writer.WritePropertyName("searchSpace"); +#if NET6_0_OR_GREATER + writer.WriteRawValue(SearchSpace); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(SearchSpace.ToString()).RootElement); +#endif + writer.WritePropertyName("trial"); + writer.WriteObjectValue(Trial); + if (Optional.IsDefined(ComponentId)) + { + if (ComponentId != null) + { + writer.WritePropertyName("componentId"); + writer.WriteStringValue(ComponentId); + } + else + { + writer.WriteNull("componentId"); + } + } + if (Optional.IsDefined(ComputeId)) + { + if (ComputeId != null) + { + writer.WritePropertyName("computeId"); + writer.WriteStringValue(ComputeId); + } + else + { + writer.WriteNull("computeId"); + } + } + if (Optional.IsDefined(DisplayName)) + { + if (DisplayName != null) + { + writer.WritePropertyName("displayName"); + writer.WriteStringValue(DisplayName); + } + else + { + writer.WriteNull("displayName"); + } + } + if (Optional.IsDefined(ExperimentName)) + { + writer.WritePropertyName("experimentName"); + writer.WriteStringValue(ExperimentName); + } + if (Optional.IsDefined(Identity)) + { + if (Identity != null) + { + writer.WritePropertyName("identity"); + writer.WriteObjectValue(Identity); + } + else + { + writer.WriteNull("identity"); + } + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + writer.WritePropertyName("jobType"); + writer.WriteStringValue(JobType.ToString()); + if (Optional.IsCollectionDefined(Services)) + { + if (Services != null) + { + writer.WritePropertyName("services"); + writer.WriteStartObject(); + foreach (var item in Services) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("services"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningSweepJob DeserializeMachineLearningSweepJob(JsonElement element) + { + Optional earlyTermination = default; + Optional> inputs = default; + Optional limits = default; + MachineLearningObjective objective = default; + Optional> outputs = default; + SamplingAlgorithm samplingAlgorithm = default; + BinaryData searchSpace = default; + TrialComponent trial = default; + Optional componentId = default; + Optional computeId = default; + Optional displayName = default; + Optional experimentName = default; + Optional identity = default; + Optional isArchived = default; + JobType jobType = default; + Optional> services = default; + Optional status = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("earlyTermination")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + earlyTermination = null; + continue; + } + earlyTermination = MachineLearningEarlyTerminationPolicy.DeserializeMachineLearningEarlyTerminationPolicy(property.Value); + continue; + } + if (property.NameEquals("inputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + inputs = 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, MachineLearningJobInput.DeserializeMachineLearningJobInput(property0.Value)); + } + } + inputs = dictionary; + continue; + } + if (property.NameEquals("limits")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + limits = MachineLearningSweepJobLimits.DeserializeMachineLearningSweepJobLimits(property.Value); + continue; + } + if (property.NameEquals("objective")) + { + objective = MachineLearningObjective.DeserializeMachineLearningObjective(property.Value); + continue; + } + if (property.NameEquals("outputs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputs = 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, MachineLearningJobOutput.DeserializeMachineLearningJobOutput(property0.Value)); + } + } + outputs = dictionary; + continue; + } + if (property.NameEquals("samplingAlgorithm")) + { + samplingAlgorithm = SamplingAlgorithm.DeserializeSamplingAlgorithm(property.Value); + continue; + } + if (property.NameEquals("searchSpace")) + { + searchSpace = BinaryData.FromString(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("trial")) + { + trial = TrialComponent.DeserializeTrialComponent(property.Value); + continue; + } + if (property.NameEquals("componentId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + componentId = null; + continue; + } + componentId = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + computeId = null; + continue; + } + computeId = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + displayName = null; + continue; + } + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("experimentName")) + { + experimentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("identity")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + identity = null; + continue; + } + identity = MachineLearningIdentityConfiguration.DeserializeMachineLearningIdentityConfiguration(property.Value); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("jobType")) + { + jobType = new JobType(property.Value.GetString()); + continue; + } + if (property.NameEquals("services")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + services = 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, MachineLearningJobService.DeserializeMachineLearningJobService(property0.Value)); + } + } + services = dictionary; + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningJobStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningSweepJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), earlyTermination.Value, Optional.ToDictionary(inputs), limits.Value, objective, Optional.ToDictionary(outputs), samplingAlgorithm, searchSpace, trial); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs new file mode 100644 index 000000000000..0aee7ccdd38a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJob.cs @@ -0,0 +1,238 @@ +// 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. + /// Serialized Name: SweepJob + /// + public partial class MachineLearningSweepJob : MachineLearningJobProperties + { + /// Initializes a new instance of MachineLearningSweepJob. + /// + /// [Required] Optimization objective. + /// Serialized Name: SweepJob.objective + /// + /// + /// [Required] The hyperparameter sampling algorithm + /// Serialized Name: SweepJob.samplingAlgorithm + /// Please note is the base class. According to the scenario, a derived class 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 + /// Serialized Name: SweepJob.searchSpace + /// + /// + /// [Required] Trial component definition. + /// Serialized Name: SweepJob.trial + /// + /// , , or is null. + public MachineLearningSweepJob(MachineLearningObjective objective, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, TrialComponent trial) + { + Argument.AssertNotNull(objective, nameof(objective)); + Argument.AssertNotNull(samplingAlgorithm, nameof(samplingAlgorithm)); + Argument.AssertNotNull(searchSpace, nameof(searchSpace)); + Argument.AssertNotNull(trial, nameof(trial)); + + Inputs = new ChangeTrackingDictionary(); + Objective = objective; + Outputs = new ChangeTrackingDictionary(); + SamplingAlgorithm = samplingAlgorithm; + SearchSpace = searchSpace; + Trial = trial; + JobType = JobType.Sweep; + } + + /// Initializes a new instance of MachineLearningSweepJob. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// ARM resource ID of the component resource. + /// Serialized Name: JobBase.componentId + /// + /// + /// ARM resource ID of the compute resource. + /// Serialized Name: JobBase.computeId + /// + /// + /// Display name of job. + /// Serialized Name: JobBase.displayName + /// + /// + /// The name of the experiment the job belongs to. If not set, the job is placed in the "Default" experiment. + /// Serialized Name: JobBase.experimentName + /// + /// + /// Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. + /// Defaults to AmlToken if null. + /// Serialized Name: JobBase.identity + /// Please note is the base class. According to the scenario, a derived class 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? + /// Serialized Name: JobBase.isArchived + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobBase.jobType + /// + /// + /// List of JobEndpoints. + /// For local jobs, a job endpoint will have an endpoint value of FileStreamObject. + /// Serialized Name: JobBase.services + /// + /// + /// Status of the job. + /// Serialized Name: JobBase.status + /// + /// + /// Early termination policies enable canceling poor-performing runs before they complete + /// Serialized Name: SweepJob.earlyTermination + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: SweepJob.inputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: SweepJob.limits + /// + /// + /// [Required] Optimization objective. + /// Serialized Name: SweepJob.objective + /// + /// + /// Mapping of output data bindings used in the job. + /// Serialized Name: SweepJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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 hyperparameter sampling algorithm + /// Serialized Name: SweepJob.samplingAlgorithm + /// Please note is the base class. According to the scenario, a derived class 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 + /// Serialized Name: SweepJob.searchSpace + /// + /// + /// [Required] Trial component definition. + /// Serialized Name: SweepJob.trial + /// + internal MachineLearningSweepJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, MachineLearningIdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, MachineLearningJobStatus? status, MachineLearningEarlyTerminationPolicy earlyTermination, IDictionary inputs, MachineLearningSweepJobLimits limits, MachineLearningObjective objective, IDictionary outputs, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, TrialComponent trial) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) + { + EarlyTermination = earlyTermination; + Inputs = inputs; + Limits = limits; + Objective = objective; + Outputs = outputs; + SamplingAlgorithm = samplingAlgorithm; + SearchSpace = searchSpace; + Trial = trial; + JobType = jobType; + } + + /// + /// Early termination policies enable canceling poor-performing runs before they complete + /// Serialized Name: SweepJob.earlyTermination + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: SweepJob.inputs + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: SweepJob.limits + /// + public MachineLearningSweepJobLimits Limits { get; set; } + /// + /// [Required] Optimization objective. + /// Serialized Name: SweepJob.objective + /// + public MachineLearningObjective Objective { get; set; } + /// + /// Mapping of output data bindings used in the job. + /// Serialized Name: SweepJob.outputs + /// Please note is the base class. According to the scenario, a derived class 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; } + /// + /// [Required] The hyperparameter sampling algorithm + /// Serialized Name: SweepJob.samplingAlgorithm + /// Please note is the base class. According to the scenario, a derived class 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 + /// Serialized Name: SweepJob.searchSpace + /// + /// To assign an object to this property use . + /// + /// + /// To assign an already formated 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 SearchSpace { get; set; } + /// + /// [Required] Trial component definition. + /// Serialized Name: SweepJob.trial + /// + public TrialComponent Trial { get; set; } + } +} 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 new file mode 100644 index 000000000000..080ff26ab831 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.Serialization.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSweepJobLimits : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxConcurrentTrials)) + { + if (MaxConcurrentTrials != null) + { + writer.WritePropertyName("maxConcurrentTrials"); + writer.WriteNumberValue(MaxConcurrentTrials.Value); + } + else + { + writer.WriteNull("maxConcurrentTrials"); + } + } + if (Optional.IsDefined(MaxTotalTrials)) + { + if (MaxTotalTrials != null) + { + writer.WritePropertyName("maxTotalTrials"); + writer.WriteNumberValue(MaxTotalTrials.Value); + } + else + { + writer.WriteNull("maxTotalTrials"); + } + } + if (Optional.IsDefined(TrialTimeout)) + { + if (TrialTimeout != null) + { + writer.WritePropertyName("trialTimeout"); + writer.WriteStringValue(TrialTimeout.Value, "P"); + } + else + { + writer.WriteNull("trialTimeout"); + } + } + writer.WritePropertyName("jobLimitsType"); + writer.WriteStringValue(JobLimitsType.ToString()); + if (Optional.IsDefined(Timeout)) + { + if (Timeout != null) + { + writer.WritePropertyName("timeout"); + writer.WriteStringValue(Timeout.Value, "P"); + } + else + { + writer.WriteNull("timeout"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningSweepJobLimits DeserializeMachineLearningSweepJobLimits(JsonElement element) + { + Optional maxConcurrentTrials = default; + Optional maxTotalTrials = default; + Optional trialTimeout = default; + JobLimitsType jobLimitsType = default; + Optional timeout = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxConcurrentTrials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxConcurrentTrials = null; + continue; + } + maxConcurrentTrials = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxTotalTrials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxTotalTrials = null; + continue; + } + maxTotalTrials = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("trialTimeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + trialTimeout = null; + continue; + } + trialTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("jobLimitsType")) + { + jobLimitsType = new JobLimitsType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + timeout = null; + continue; + } + timeout = property.Value.GetTimeSpan("P"); + continue; + } + } + return new MachineLearningSweepJobLimits(jobLimitsType, Optional.ToNullable(timeout), Optional.ToNullable(maxConcurrentTrials), Optional.ToNullable(maxTotalTrials), Optional.ToNullable(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 new file mode 100644 index 000000000000..18f30f4289e2 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSweepJobLimits.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Sweep Job limit class. + /// Serialized Name: SweepJobLimits + /// + public partial class MachineLearningSweepJobLimits : MachineLearningJobLimits + { + /// Initializes a new instance of MachineLearningSweepJobLimits. + public MachineLearningSweepJobLimits() + { + JobLimitsType = JobLimitsType.Sweep; + } + + /// Initializes a new instance of MachineLearningSweepJobLimits. + /// + /// [Required] JobLimit type. + /// Serialized Name: JobLimits.jobLimitsType + /// + /// + /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. + /// Serialized Name: JobLimits.timeout + /// + /// + /// Sweep Job max concurrent trials. + /// Serialized Name: SweepJobLimits.maxConcurrentTrials + /// + /// + /// Sweep Job max total trials. + /// Serialized Name: SweepJobLimits.maxTotalTrials + /// + /// + /// Sweep Job Trial timeout value. + /// Serialized Name: SweepJobLimits.trialTimeout + /// + internal MachineLearningSweepJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout, int? maxConcurrentTrials, int? maxTotalTrials, TimeSpan? trialTimeout) : base(jobLimitsType, timeout) + { + MaxConcurrentTrials = maxConcurrentTrials; + MaxTotalTrials = maxTotalTrials; + TrialTimeout = trialTimeout; + JobLimitsType = jobLimitsType; + } + + /// + /// Sweep Job max concurrent trials. + /// Serialized Name: SweepJobLimits.maxConcurrentTrials + /// + public int? MaxConcurrentTrials { get; set; } + /// + /// Sweep Job max total trials. + /// Serialized Name: SweepJobLimits.maxTotalTrials + /// + public int? MaxTotalTrials { get; set; } + /// + /// Sweep Job Trial timeout value. + /// Serialized Name: SweepJobLimits.trialTimeout + /// + public TimeSpan? TrialTimeout { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSpark.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSpark.Serialization.cs new file mode 100644 index 000000000000..089e23b9ba20 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSpark.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSynapseSpark : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningSynapseSpark DeserializeMachineLearningSynapseSpark(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningSynapseSparkProperties.DeserializeMachineLearningSynapseSparkProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningSynapseSpark(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSpark.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSpark.cs new file mode 100644 index 000000000000..42765564eae7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSpark.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// A SynapseSpark compute. + /// Serialized Name: SynapseSpark + /// + public partial class MachineLearningSynapseSpark : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningSynapseSpark. + public MachineLearningSynapseSpark() + { + ComputeType = ComputeType.SynapseSpark; + } + + /// Initializes a new instance of MachineLearningSynapseSpark. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// Serialized Name: SynapseSpark.properties. + internal MachineLearningSynapseSpark(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningSynapseSparkProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// Serialized Name: SynapseSpark.properties. + public MachineLearningSynapseSparkProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSparkProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSparkProperties.Serialization.cs new file mode 100644 index 000000000000..6db64f7beb80 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSparkProperties.Serialization.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningSynapseSparkProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(AutoScaleProperties)) + { + writer.WritePropertyName("autoScaleProperties"); + writer.WriteObjectValue(AutoScaleProperties); + } + if (Optional.IsDefined(AutoPauseProperties)) + { + writer.WritePropertyName("autoPauseProperties"); + writer.WriteObjectValue(AutoPauseProperties); + } + if (Optional.IsDefined(SparkVersion)) + { + writer.WritePropertyName("sparkVersion"); + writer.WriteStringValue(SparkVersion); + } + if (Optional.IsDefined(NodeCount)) + { + writer.WritePropertyName("nodeCount"); + writer.WriteNumberValue(NodeCount.Value); + } + if (Optional.IsDefined(NodeSize)) + { + writer.WritePropertyName("nodeSize"); + writer.WriteStringValue(NodeSize); + } + if (Optional.IsDefined(NodeSizeFamily)) + { + writer.WritePropertyName("nodeSizeFamily"); + writer.WriteStringValue(NodeSizeFamily); + } + if (Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"); + writer.WriteStringValue(SubscriptionId); + } + if (Optional.IsDefined(ResourceGroup)) + { + writer.WritePropertyName("resourceGroup"); + writer.WriteStringValue(ResourceGroup); + } + if (Optional.IsDefined(WorkspaceName)) + { + writer.WritePropertyName("workspaceName"); + writer.WriteStringValue(WorkspaceName); + } + if (Optional.IsDefined(PoolName)) + { + writer.WritePropertyName("poolName"); + writer.WriteStringValue(PoolName); + } + writer.WriteEndObject(); + } + + internal static MachineLearningSynapseSparkProperties DeserializeMachineLearningSynapseSparkProperties(JsonElement element) + { + Optional autoScaleProperties = default; + Optional autoPauseProperties = default; + Optional sparkVersion = default; + Optional nodeCount = default; + Optional nodeSize = default; + Optional nodeSizeFamily = default; + Optional subscriptionId = default; + Optional resourceGroup = default; + Optional workspaceName = default; + Optional poolName = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("autoScaleProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoScaleProperties = MachineLearningAutoScaleProperties.DeserializeMachineLearningAutoScaleProperties(property.Value); + continue; + } + if (property.NameEquals("autoPauseProperties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + autoPauseProperties = MachineLearningAutoPauseProperties.DeserializeMachineLearningAutoPauseProperties(property.Value); + continue; + } + if (property.NameEquals("sparkVersion")) + { + sparkVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeSize")) + { + nodeSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeSizeFamily")) + { + nodeSizeFamily = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionId")) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceGroup")) + { + resourceGroup = property.Value.GetString(); + continue; + } + if (property.NameEquals("workspaceName")) + { + workspaceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("poolName")) + { + poolName = property.Value.GetString(); + continue; + } + } + return new MachineLearningSynapseSparkProperties(autoScaleProperties.Value, autoPauseProperties.Value, sparkVersion.Value, Optional.ToNullable(nodeCount), nodeSize.Value, nodeSizeFamily.Value, subscriptionId.Value, resourceGroup.Value, workspaceName.Value, poolName.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSparkProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSparkProperties.cs new file mode 100644 index 000000000000..cc9782c907c9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningSynapseSparkProperties.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningSynapseSparkProperties. + /// Serialized Name: SynapseSparkProperties + /// + public partial class MachineLearningSynapseSparkProperties + { + /// Initializes a new instance of MachineLearningSynapseSparkProperties. + public MachineLearningSynapseSparkProperties() + { + } + + /// Initializes a new instance of MachineLearningSynapseSparkProperties. + /// + /// Auto scale properties. + /// Serialized Name: SynapseSparkProperties.autoScaleProperties + /// + /// + /// Auto pause properties. + /// Serialized Name: SynapseSparkProperties.autoPauseProperties + /// + /// + /// Spark version. + /// Serialized Name: SynapseSparkProperties.sparkVersion + /// + /// + /// The number of compute nodes currently assigned to the compute. + /// Serialized Name: SynapseSparkProperties.nodeCount + /// + /// + /// Node size. + /// Serialized Name: SynapseSparkProperties.nodeSize + /// + /// + /// Node size family. + /// Serialized Name: SynapseSparkProperties.nodeSizeFamily + /// + /// + /// Azure subscription identifier. + /// Serialized Name: SynapseSparkProperties.subscriptionId + /// + /// + /// Name of the resource group in which workspace is located. + /// Serialized Name: SynapseSparkProperties.resourceGroup + /// + /// + /// Name of Azure Machine Learning workspace. + /// Serialized Name: SynapseSparkProperties.workspaceName + /// + /// + /// Pool name. + /// Serialized Name: SynapseSparkProperties.poolName + /// + internal MachineLearningSynapseSparkProperties(MachineLearningAutoScaleProperties autoScaleProperties, MachineLearningAutoPauseProperties autoPauseProperties, string sparkVersion, int? nodeCount, string nodeSize, string nodeSizeFamily, string subscriptionId, string resourceGroup, string workspaceName, string poolName) + { + AutoScaleProperties = autoScaleProperties; + AutoPauseProperties = autoPauseProperties; + SparkVersion = sparkVersion; + NodeCount = nodeCount; + NodeSize = nodeSize; + NodeSizeFamily = nodeSizeFamily; + SubscriptionId = subscriptionId; + ResourceGroup = resourceGroup; + WorkspaceName = workspaceName; + PoolName = poolName; + } + + /// + /// Auto scale properties. + /// Serialized Name: SynapseSparkProperties.autoScaleProperties + /// + public MachineLearningAutoScaleProperties AutoScaleProperties { get; set; } + /// + /// Auto pause properties. + /// Serialized Name: SynapseSparkProperties.autoPauseProperties + /// + public MachineLearningAutoPauseProperties AutoPauseProperties { get; set; } + /// + /// Spark version. + /// Serialized Name: SynapseSparkProperties.sparkVersion + /// + public string SparkVersion { get; set; } + /// + /// The number of compute nodes currently assigned to the compute. + /// Serialized Name: SynapseSparkProperties.nodeCount + /// + public int? NodeCount { get; set; } + /// + /// Node size. + /// Serialized Name: SynapseSparkProperties.nodeSize + /// + public string NodeSize { get; set; } + /// + /// Node size family. + /// Serialized Name: SynapseSparkProperties.nodeSizeFamily + /// + public string NodeSizeFamily { get; set; } + /// + /// Azure subscription identifier. + /// Serialized Name: SynapseSparkProperties.subscriptionId + /// + public string SubscriptionId { get; set; } + /// + /// Name of the resource group in which workspace is located. + /// Serialized Name: SynapseSparkProperties.resourceGroup + /// + public string ResourceGroup { get; set; } + /// + /// Name of Azure Machine Learning workspace. + /// Serialized Name: SynapseSparkProperties.workspaceName + /// + public string WorkspaceName { get; set; } + /// + /// Pool name. + /// Serialized Name: SynapseSparkProperties.poolName + /// + public string PoolName { 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 new file mode 100644 index 000000000000..e5eedfd09fcf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.Serialization.cs @@ -0,0 +1,217 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTable : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ReferencedUris)) + { + if (ReferencedUris != null) + { + writer.WritePropertyName("referencedUris"); + writer.WriteStartArray(); + foreach (var item in ReferencedUris) + { + writer.WriteStringValue(item.AbsoluteUri); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("referencedUris"); + } + } + writer.WritePropertyName("dataType"); + writer.WriteStringValue(DataType.ToString()); + writer.WritePropertyName("dataUri"); + writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningTable DeserializeMachineLearningTable(JsonElement element) + { + Optional> referencedUris = default; + MachineLearningDataType dataType = default; + Uri dataUri = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("referencedUris")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + referencedUris = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new Uri(item.GetString())); + } + referencedUris = array; + continue; + } + if (property.NameEquals("dataType")) + { + dataType = new MachineLearningDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataUri")) + { + dataUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningTable(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri, Optional.ToList(referencedUris)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs new file mode 100644 index 000000000000..3aa45d485eec --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTable.cs @@ -0,0 +1,79 @@ +// 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 +{ + /// + /// MLTable data definition + /// Serialized Name: MLTableData + /// + public partial class MachineLearningTable : MachineLearningDataVersionProperties + { + /// Initializes a new instance of MachineLearningTable. + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + /// is null. + public MachineLearningTable(Uri dataUri) : base(dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + ReferencedUris = new ChangeTrackingList(); + DataType = MachineLearningDataType.Mltable; + } + + /// Initializes a new instance of MachineLearningTable. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataVersionBase.dataType + /// + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + /// + /// Uris referenced in the MLTable definition (required for lineage) + /// Serialized Name: MLTableData.referencedUris + /// + internal MachineLearningTable(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri, IList referencedUris) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) + { + ReferencedUris = referencedUris; + DataType = dataType; + } + + /// + /// Uris referenced in the MLTable definition (required for lineage) + /// Serialized Name: MLTableData.referencedUris + /// + public IList ReferencedUris { get; set; } + } +} 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 new file mode 100644 index 000000000000..1071a5056678 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTableJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningTableJobInput DeserializeMachineLearningTableJobInput(JsonElement element) + { + Optional mode = default; + Uri uri = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningTableJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs new file mode 100644 index 000000000000..3cfd9f41740f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningTableJobInput. + /// Serialized Name: MLTableJobInput + /// + public partial class MachineLearningTableJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningTableJobInput. + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + /// is null. + public MachineLearningTableJobInput(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + JobInputType = JobInputType.Mltable; + } + + /// Initializes a new instance of MachineLearningTableJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + internal MachineLearningTableJobInput(string description, JobInputType jobInputType, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType) + { + Mode = mode; + Uri = uri; + JobInputType = jobInputType; + } + + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + public MachineLearningInputDeliveryMode? Mode { get; set; } + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..c8ab3f771add --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTableJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningTableJobOutput DeserializeMachineLearningTableJobOutput(JsonElement element) + { + Optional mode = default; + Optional uri = default; + Optional description = default; + JobOutputType jobOutputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutputType")) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningTableJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs new file mode 100644 index 000000000000..915f62446ffb --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTableJobOutput.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningTableJobOutput. + /// Serialized Name: MLTableJobOutput + /// + public partial class MachineLearningTableJobOutput : MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningTableJobOutput. + public MachineLearningTableJobOutput() + { + JobOutputType = JobOutputType.Mltable; + } + + /// Initializes a new instance of MachineLearningTableJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + internal MachineLearningTableJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + { + Mode = mode; + Uri = uri; + JobOutputType = jobOutputType; + } + + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + public MachineLearningOutputDeliveryMode? Mode { get; set; } + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..bae6d7ca1142 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTargetUtilizationScaleSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxInstances)) + { + writer.WritePropertyName("maxInstances"); + writer.WriteNumberValue(MaxInstances.Value); + } + if (Optional.IsDefined(MinInstances)) + { + writer.WritePropertyName("minInstances"); + writer.WriteNumberValue(MinInstances.Value); + } + if (Optional.IsDefined(PollingInterval)) + { + writer.WritePropertyName("pollingInterval"); + writer.WriteStringValue(PollingInterval.Value, "P"); + } + if (Optional.IsDefined(TargetUtilizationPercentage)) + { + writer.WritePropertyName("targetUtilizationPercentage"); + writer.WriteNumberValue(TargetUtilizationPercentage.Value); + } + writer.WritePropertyName("scaleType"); + writer.WriteStringValue(ScaleType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningTargetUtilizationScaleSettings DeserializeMachineLearningTargetUtilizationScaleSettings(JsonElement element) + { + Optional maxInstances = default; + Optional minInstances = default; + Optional pollingInterval = default; + Optional targetUtilizationPercentage = default; + ScaleType scaleType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxInstances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxInstances = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("minInstances")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + minInstances = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("pollingInterval")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + pollingInterval = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("targetUtilizationPercentage")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + targetUtilizationPercentage = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scaleType")) + { + scaleType = new ScaleType(property.Value.GetString()); + continue; + } + } + return new MachineLearningTargetUtilizationScaleSettings(scaleType, Optional.ToNullable(maxInstances), Optional.ToNullable(minInstances), Optional.ToNullable(pollingInterval), Optional.ToNullable(targetUtilizationPercentage)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs new file mode 100644 index 000000000000..b527a791ce46 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTargetUtilizationScaleSettings.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningTargetUtilizationScaleSettings. + /// Serialized Name: TargetUtilizationScaleSettings + /// + public partial class MachineLearningTargetUtilizationScaleSettings : MachineLearningOnlineScaleSettings + { + /// Initializes a new instance of MachineLearningTargetUtilizationScaleSettings. + public MachineLearningTargetUtilizationScaleSettings() + { + ScaleType = ScaleType.TargetUtilization; + } + + /// Initializes a new instance of MachineLearningTargetUtilizationScaleSettings. + /// + /// [Required] Type of deployment scaling algorithm + /// Serialized Name: OnlineScaleSettings.scaleType + /// + /// + /// The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + /// Serialized Name: TargetUtilizationScaleSettings.maxInstances + /// + /// + /// The minimum number of instances to always be present. + /// Serialized Name: TargetUtilizationScaleSettings.minInstances + /// + /// + /// The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. + /// Serialized Name: TargetUtilizationScaleSettings.pollingInterval + /// + /// + /// Target CPU usage for the autoscaler. + /// Serialized Name: TargetUtilizationScaleSettings.targetUtilizationPercentage + /// + internal MachineLearningTargetUtilizationScaleSettings(ScaleType scaleType, int? maxInstances, int? minInstances, TimeSpan? pollingInterval, int? targetUtilizationPercentage) : base(scaleType) + { + MaxInstances = maxInstances; + MinInstances = minInstances; + PollingInterval = pollingInterval; + TargetUtilizationPercentage = targetUtilizationPercentage; + ScaleType = scaleType; + } + + /// + /// The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances. + /// Serialized Name: TargetUtilizationScaleSettings.maxInstances + /// + public int? MaxInstances { get; set; } + /// + /// The minimum number of instances to always be present. + /// Serialized Name: TargetUtilizationScaleSettings.minInstances + /// + public int? MinInstances { get; set; } + /// + /// The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds. + /// Serialized Name: TargetUtilizationScaleSettings.pollingInterval + /// + public TimeSpan? PollingInterval { get; set; } + /// + /// Target CPU usage for the autoscaler. + /// Serialized Name: TargetUtilizationScaleSettings.targetUtilizationPercentage + /// + public int? TargetUtilizationPercentage { 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 new file mode 100644 index 000000000000..abd5cc130e88 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTrainingSettings : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IsDnnTrainingEnabled)) + { + writer.WritePropertyName("enableDnnTraining"); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); + } + if (Optional.IsDefined(IsModelExplainabilityEnabled)) + { + writer.WritePropertyName("enableModelExplainability"); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); + } + if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) + { + writer.WritePropertyName("enableOnnxCompatibleModels"); + writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); + } + if (Optional.IsDefined(IsStackEnsembleEnabled)) + { + writer.WritePropertyName("enableStackEnsemble"); + writer.WriteBooleanValue(IsStackEnsembleEnabled.Value); + } + if (Optional.IsDefined(IsVoteEnsembleEnabled)) + { + writer.WritePropertyName("enableVoteEnsemble"); + writer.WriteBooleanValue(IsVoteEnsembleEnabled.Value); + } + if (Optional.IsDefined(EnsembleModelDownloadTimeout)) + { + writer.WritePropertyName("ensembleModelDownloadTimeout"); + writer.WriteStringValue(EnsembleModelDownloadTimeout.Value, "P"); + } + if (Optional.IsDefined(StackEnsembleSettings)) + { + if (StackEnsembleSettings != null) + { + writer.WritePropertyName("stackEnsembleSettings"); + writer.WriteObjectValue(StackEnsembleSettings); + } + else + { + writer.WriteNull("stackEnsembleSettings"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningTrainingSettings DeserializeMachineLearningTrainingSettings(JsonElement element) + { + Optional enableDnnTraining = default; + Optional enableModelExplainability = default; + Optional enableOnnxCompatibleModels = default; + Optional enableStackEnsemble = default; + Optional enableVoteEnsemble = default; + Optional ensembleModelDownloadTimeout = default; + Optional stackEnsembleSettings = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("enableDnnTraining")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableDnnTraining = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableModelExplainability")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableModelExplainability = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableOnnxCompatibleModels")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableOnnxCompatibleModels = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableStackEnsemble")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableStackEnsemble = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("enableVoteEnsemble")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + enableVoteEnsemble = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("ensembleModelDownloadTimeout")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("stackEnsembleSettings")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stackEnsembleSettings = null; + continue; + } + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); + continue; + } + } + return new MachineLearningTrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs new file mode 100644 index 000000000000..5bf329cf90cd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTrainingSettings.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Training related configuration. + /// Serialized Name: TrainingSettings + /// + public partial class MachineLearningTrainingSettings + { + /// Initializes a new instance of MachineLearningTrainingSettings. + public MachineLearningTrainingSettings() + { + } + + /// Initializes a new instance of MachineLearningTrainingSettings. + /// + /// Enable recommendation of DNN models. + /// Serialized Name: TrainingSettings.enableDnnTraining + /// + /// + /// Flag to turn on explainability on best model. + /// Serialized Name: TrainingSettings.enableModelExplainability + /// + /// + /// Flag for enabling onnx compatible models. + /// Serialized Name: TrainingSettings.enableOnnxCompatibleModels + /// + /// + /// Enable stack ensemble run. + /// Serialized Name: TrainingSettings.enableStackEnsemble + /// + /// + /// Enable voting ensemble run. + /// Serialized Name: TrainingSettings.enableVoteEnsemble + /// + /// + /// 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. + /// Serialized Name: TrainingSettings.ensembleModelDownloadTimeout + /// + /// + /// Stack ensemble settings for stack ensemble run. + /// Serialized Name: TrainingSettings.stackEnsembleSettings + /// + internal MachineLearningTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings) + { + IsDnnTrainingEnabled = isDnnTrainingEnabled; + IsModelExplainabilityEnabled = isModelExplainabilityEnabled; + IsOnnxCompatibleModelsEnabled = isOnnxCompatibleModelsEnabled; + IsStackEnsembleEnabled = isStackEnsembleEnabled; + IsVoteEnsembleEnabled = isVoteEnsembleEnabled; + EnsembleModelDownloadTimeout = ensembleModelDownloadTimeout; + StackEnsembleSettings = stackEnsembleSettings; + } + + /// + /// Enable recommendation of DNN models. + /// Serialized Name: TrainingSettings.enableDnnTraining + /// + public bool? IsDnnTrainingEnabled { get; set; } + /// + /// Flag to turn on explainability on best model. + /// Serialized Name: TrainingSettings.enableModelExplainability + /// + public bool? IsModelExplainabilityEnabled { get; set; } + /// + /// Flag for enabling onnx compatible models. + /// Serialized Name: TrainingSettings.enableOnnxCompatibleModels + /// + public bool? IsOnnxCompatibleModelsEnabled { get; set; } + /// + /// Enable stack ensemble run. + /// Serialized Name: TrainingSettings.enableStackEnsemble + /// + public bool? IsStackEnsembleEnabled { get; set; } + /// + /// Enable voting ensemble run. + /// Serialized Name: TrainingSettings.enableVoteEnsemble + /// + public bool? IsVoteEnsembleEnabled { get; set; } + /// + /// 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. + /// Serialized Name: TrainingSettings.ensembleModelDownloadTimeout + /// + public TimeSpan? EnsembleModelDownloadTimeout { get; set; } + /// + /// Stack ensemble settings for stack ensemble run. + /// Serialized Name: TrainingSettings.stackEnsembleSettings + /// + public MachineLearningStackEnsembleSettings StackEnsembleSettings { 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 new file mode 100644 index 000000000000..6ddf6a378d32 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTriggerBase : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(EndTime)) + { + if (EndTime != null) + { + writer.WritePropertyName("endTime"); + writer.WriteStringValue(EndTime); + } + else + { + writer.WriteNull("endTime"); + } + } + if (Optional.IsDefined(StartTime)) + { + if (StartTime != null) + { + writer.WritePropertyName("startTime"); + writer.WriteStringValue(StartTime); + } + else + { + writer.WriteNull("startTime"); + } + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"); + writer.WriteStringValue(TimeZone); + } + writer.WritePropertyName("triggerType"); + writer.WriteStringValue(TriggerType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningTriggerBase DeserializeMachineLearningTriggerBase(JsonElement element) + { + if (element.TryGetProperty("triggerType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Cron": return CronTrigger.DeserializeCronTrigger(element); + case "Recurrence": return MachineLearningRecurrenceTrigger.DeserializeMachineLearningRecurrenceTrigger(element); + } + } + return UnknownTriggerBase.DeserializeUnknownTriggerBase(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs new file mode 100644 index 000000000000..3050689b6179 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerBase.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningTriggerBase. + /// Serialized Name: TriggerBase + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningTriggerBase + { + /// Initializes a new instance of MachineLearningTriggerBase. + protected MachineLearningTriggerBase() + { + } + + /// Initializes a new instance of MachineLearningTriggerBase. + /// + /// 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" + /// If not present, the schedule will run indefinitely + /// Serialized Name: TriggerBase.endTime + /// + /// + /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + /// Serialized Name: TriggerBase.startTime + /// + /// + /// 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 + /// Serialized Name: TriggerBase.timeZone + /// + /// + /// [Required] + /// Serialized Name: TriggerBase.triggerType + /// + internal MachineLearningTriggerBase(string endTime, string startTime, string timeZone, MachineLearningTriggerType triggerType) + { + EndTime = endTime; + StartTime = startTime; + TimeZone = timeZone; + TriggerType = triggerType; + } + + /// + /// 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" + /// If not present, the schedule will run indefinitely + /// Serialized Name: TriggerBase.endTime + /// + public string EndTime { get; set; } + /// + /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + /// Serialized Name: TriggerBase.startTime + /// + public string StartTime { get; set; } + /// + /// 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 + /// Serialized Name: TriggerBase.timeZone + /// + public string TimeZone { get; set; } + /// + /// [Required] + /// Serialized Name: TriggerBase.triggerType + /// + internal MachineLearningTriggerType 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 new file mode 100644 index 000000000000..902cc1c76e82 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTriggerType.cs @@ -0,0 +1,60 @@ +// 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 MachineLearningTriggerType. + /// Serialized Name: TriggerType + /// + public readonly partial struct MachineLearningTriggerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningTriggerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RecurrenceValue = "Recurrence"; + private const string CronValue = "Cron"; + + /// + /// Recurrence + /// Serialized Name: TriggerType.Recurrence + /// + public static MachineLearningTriggerType Recurrence { get; } = new MachineLearningTriggerType(RecurrenceValue); + /// + /// Cron + /// Serialized Name: TriggerType.Cron + /// + public static MachineLearningTriggerType Cron { get; } = new MachineLearningTriggerType(CronValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningTriggerType left, MachineLearningTriggerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningTriggerType left, MachineLearningTriggerType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningTriggerType(string value) => new MachineLearningTriggerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningTriggerType other && Equals(other); + /// + public bool Equals(MachineLearningTriggerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _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 new file mode 100644 index 000000000000..8e30bbdfec58 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTritonModelJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningTritonModelJobInput DeserializeMachineLearningTritonModelJobInput(JsonElement element) + { + Optional mode = default; + Uri uri = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningTritonModelJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs new file mode 100644 index 000000000000..ab80089ccf2d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningTritonModelJobInput. + /// Serialized Name: TritonModelJobInput + /// + public partial class MachineLearningTritonModelJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningTritonModelJobInput. + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + /// is null. + public MachineLearningTritonModelJobInput(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + JobInputType = JobInputType.TritonModel; + } + + /// Initializes a new instance of MachineLearningTritonModelJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + internal MachineLearningTritonModelJobInput(string description, JobInputType jobInputType, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType) + { + Mode = mode; + Uri = uri; + JobInputType = jobInputType; + } + + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + public MachineLearningInputDeliveryMode? Mode { get; set; } + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..d69877b0a184 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningTritonModelJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningTritonModelJobOutput DeserializeMachineLearningTritonModelJobOutput(JsonElement element) + { + Optional mode = default; + Optional uri = default; + Optional description = default; + JobOutputType jobOutputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutputType")) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningTritonModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs new file mode 100644 index 000000000000..11fb0a54ae8f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningTritonModelJobOutput.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningTritonModelJobOutput. + /// Serialized Name: TritonModelJobOutput + /// + public partial class MachineLearningTritonModelJobOutput : MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningTritonModelJobOutput. + public MachineLearningTritonModelJobOutput() + { + JobOutputType = JobOutputType.TritonModel; + } + + /// Initializes a new instance of MachineLearningTritonModelJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + internal MachineLearningTritonModelJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + { + Mode = mode; + Uri = uri; + JobOutputType = jobOutputType; + } + + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + public MachineLearningOutputDeliveryMode? Mode { get; set; } + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUnderlyingResourceAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUnderlyingResourceAction.cs new file mode 100644 index 000000000000..5a93c434d223 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUnderlyingResourceAction.cs @@ -0,0 +1,60 @@ +// 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 MachineLearningUnderlyingResourceAction. + /// Serialized Name: UnderlyingResourceAction + /// + public readonly partial struct MachineLearningUnderlyingResourceAction : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningUnderlyingResourceAction(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeleteValue = "Delete"; + private const string DetachValue = "Detach"; + + /// + /// Delete + /// Serialized Name: UnderlyingResourceAction.Delete + /// + public static MachineLearningUnderlyingResourceAction Delete { get; } = new MachineLearningUnderlyingResourceAction(DeleteValue); + /// + /// Detach + /// Serialized Name: UnderlyingResourceAction.Detach + /// + public static MachineLearningUnderlyingResourceAction Detach { get; } = new MachineLearningUnderlyingResourceAction(DetachValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningUnderlyingResourceAction left, MachineLearningUnderlyingResourceAction right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningUnderlyingResourceAction left, MachineLearningUnderlyingResourceAction right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningUnderlyingResourceAction(string value) => new MachineLearningUnderlyingResourceAction(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningUnderlyingResourceAction other && Equals(other); + /// + public bool Equals(MachineLearningUnderlyingResourceAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUnitOfMeasure.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUnitOfMeasure.cs new file mode 100644 index 000000000000..79bab7f36b7e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUnitOfMeasure.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The unit of time measurement for the specified VM price. Example: OneHour + /// Serialized Name: UnitOfMeasure + /// + public readonly partial struct MachineLearningUnitOfMeasure : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningUnitOfMeasure(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OneHourValue = "OneHour"; + + /// + /// OneHour + /// Serialized Name: UnitOfMeasure.OneHour + /// + public static MachineLearningUnitOfMeasure OneHour { get; } = new MachineLearningUnitOfMeasure(OneHourValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningUnitOfMeasure left, MachineLearningUnitOfMeasure right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningUnitOfMeasure left, MachineLearningUnitOfMeasure right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningUnitOfMeasure(string value) => new MachineLearningUnitOfMeasure(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningUnitOfMeasure other && Equals(other); + /// + public bool Equals(MachineLearningUnitOfMeasure other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} 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 new file mode 100644 index 000000000000..73c54b8d2c16 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.Serialization.cs @@ -0,0 +1,184 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUriFileDataVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"); + writer.WriteStringValue(DataType.ToString()); + writer.WritePropertyName("dataUri"); + writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningUriFileDataVersion DeserializeMachineLearningUriFileDataVersion(JsonElement element) + { + MachineLearningDataType dataType = default; + Uri dataUri = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType")) + { + dataType = new MachineLearningDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataUri")) + { + dataUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningUriFileDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), 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 new file mode 100644 index 000000000000..2f61cf1dca21 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileDataVersion.cs @@ -0,0 +1,67 @@ +// 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 +{ + /// + /// uri-file data version entity + /// Serialized Name: UriFileDataVersion + /// + public partial class MachineLearningUriFileDataVersion : MachineLearningDataVersionProperties + { + /// Initializes a new instance of MachineLearningUriFileDataVersion. + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + /// is null. + public MachineLearningUriFileDataVersion(Uri dataUri) : base(dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + DataType = MachineLearningDataType.UriFile; + } + + /// Initializes a new instance of MachineLearningUriFileDataVersion. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataVersionBase.dataType + /// + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + internal MachineLearningUriFileDataVersion(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived, 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 new file mode 100644 index 000000000000..f426d43cb3e1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUriFileJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningUriFileJobInput DeserializeMachineLearningUriFileJobInput(JsonElement element) + { + Optional mode = default; + Uri uri = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningUriFileJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs new file mode 100644 index 000000000000..293f9d9496ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningUriFileJobInput. + /// Serialized Name: UriFileJobInput + /// + public partial class MachineLearningUriFileJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningUriFileJobInput. + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + /// is null. + public MachineLearningUriFileJobInput(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + JobInputType = JobInputType.UriFile; + } + + /// Initializes a new instance of MachineLearningUriFileJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + internal MachineLearningUriFileJobInput(string description, JobInputType jobInputType, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType) + { + Mode = mode; + Uri = uri; + JobInputType = jobInputType; + } + + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + public MachineLearningInputDeliveryMode? Mode { get; set; } + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..8768124a501f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUriFileJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningUriFileJobOutput DeserializeMachineLearningUriFileJobOutput(JsonElement element) + { + Optional mode = default; + Optional uri = default; + Optional description = default; + JobOutputType jobOutputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutputType")) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningUriFileJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs new file mode 100644 index 000000000000..a201fcf1e2d9 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFileJobOutput.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningUriFileJobOutput. + /// Serialized Name: UriFileJobOutput + /// + public partial class MachineLearningUriFileJobOutput : MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningUriFileJobOutput. + public MachineLearningUriFileJobOutput() + { + JobOutputType = JobOutputType.UriFile; + } + + /// Initializes a new instance of MachineLearningUriFileJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + internal MachineLearningUriFileJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + { + Mode = mode; + Uri = uri; + JobOutputType = jobOutputType; + } + + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + public MachineLearningOutputDeliveryMode? Mode { get; set; } + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..83d0a5df1487 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.Serialization.cs @@ -0,0 +1,184 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUriFolderDataVersion : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("dataType"); + writer.WriteStringValue(DataType.ToString()); + writer.WritePropertyName("dataUri"); + writer.WriteStringValue(DataUri.AbsoluteUri); + if (Optional.IsDefined(IsAnonymous)) + { + writer.WritePropertyName("isAnonymous"); + writer.WriteBooleanValue(IsAnonymous.Value); + } + if (Optional.IsDefined(IsArchived)) + { + writer.WritePropertyName("isArchived"); + writer.WriteBooleanValue(IsArchived.Value); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsCollectionDefined(Properties)) + { + if (Properties != null) + { + writer.WritePropertyName("properties"); + 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"); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("tags"); + } + } + writer.WriteEndObject(); + } + + internal static MachineLearningUriFolderDataVersion DeserializeMachineLearningUriFolderDataVersion(JsonElement element) + { + MachineLearningDataType dataType = default; + Uri dataUri = default; + Optional isAnonymous = default; + Optional isArchived = default; + Optional description = default; + Optional> properties = default; + Optional> tags = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataType")) + { + dataType = new MachineLearningDataType(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataUri")) + { + dataUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("isAnonymous")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAnonymous = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isArchived")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isArchived = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + properties = 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, property0.Value.GetString()); + } + } + properties = dictionary; + continue; + } + if (property.NameEquals("tags")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + tags = 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, property0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + } + return new MachineLearningUriFolderDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), 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 new file mode 100644 index 000000000000..35f9fd120210 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderDataVersion.cs @@ -0,0 +1,67 @@ +// 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 +{ + /// + /// uri-folder data version entity + /// Serialized Name: UriFolderDataVersion + /// + public partial class MachineLearningUriFolderDataVersion : MachineLearningDataVersionProperties + { + /// Initializes a new instance of MachineLearningUriFolderDataVersion. + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + /// is null. + public MachineLearningUriFolderDataVersion(Uri dataUri) : base(dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + DataType = MachineLearningDataType.UriFolder; + } + + /// Initializes a new instance of MachineLearningUriFolderDataVersion. + /// + /// The asset description text. + /// Serialized Name: ResourceBase.description + /// + /// + /// The asset property dictionary. + /// Serialized Name: ResourceBase.properties + /// + /// + /// Tag dictionary. Tags can be added, removed, and updated. + /// Serialized Name: ResourceBase.tags + /// + /// + /// If the name version are system generated (anonymous registration). + /// Serialized Name: AssetBase.isAnonymous + /// + /// + /// Is the asset archived? + /// Serialized Name: AssetBase.isArchived + /// + /// + /// [Required] Specifies the type of data. + /// Serialized Name: DataVersionBase.dataType + /// + /// + /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType + /// Serialized Name: DataVersionBase.dataUri + /// + internal MachineLearningUriFolderDataVersion(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, MachineLearningDataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived, 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 new file mode 100644 index 000000000000..92d27298d35d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.Serialization.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUriFolderJobInput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobInputType"); + writer.WriteStringValue(JobInputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningUriFolderJobInput DeserializeMachineLearningUriFolderJobInput(JsonElement element) + { + Optional mode = default; + Uri uri = default; + Optional description = default; + JobInputType jobInputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningInputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobInputType")) + { + jobInputType = new JobInputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningUriFolderJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs new file mode 100644 index 000000000000..8719cf47686d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobInput.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningUriFolderJobInput. + /// Serialized Name: UriFolderJobInput + /// + public partial class MachineLearningUriFolderJobInput : MachineLearningJobInput + { + /// Initializes a new instance of MachineLearningUriFolderJobInput. + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + /// is null. + public MachineLearningUriFolderJobInput(Uri uri) + { + Argument.AssertNotNull(uri, nameof(uri)); + + Uri = uri; + JobInputType = JobInputType.UriFolder; + } + + /// Initializes a new instance of MachineLearningUriFolderJobInput. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + internal MachineLearningUriFolderJobInput(string description, JobInputType jobInputType, MachineLearningInputDeliveryMode? mode, Uri uri) : base(description, jobInputType) + { + Mode = mode; + Uri = uri; + JobInputType = jobInputType; + } + + /// + /// Input Asset Delivery Mode. + /// Serialized Name: AssetJobInput.mode + /// + public MachineLearningInputDeliveryMode? Mode { get; set; } + /// + /// [Required] Input Asset URI. + /// Serialized Name: AssetJobInput.uri + /// + public Uri Uri { 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 new file mode 100644 index 000000000000..c41a7dc3c5b0 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUriFolderJobOutput : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(Uri)) + { + if (Uri != null) + { + writer.WritePropertyName("uri"); + writer.WriteStringValue(Uri.AbsoluteUri); + } + else + { + writer.WriteNull("uri"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + writer.WritePropertyName("jobOutputType"); + writer.WriteStringValue(JobOutputType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningUriFolderJobOutput DeserializeMachineLearningUriFolderJobOutput(JsonElement element) + { + Optional mode = default; + Optional uri = default; + Optional description = default; + JobOutputType jobOutputType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + mode = new MachineLearningOutputDeliveryMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("uri")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + uri = null; + continue; + } + uri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("jobOutputType")) + { + jobOutputType = new JobOutputType(property.Value.GetString()); + continue; + } + } + return new MachineLearningUriFolderJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs new file mode 100644 index 000000000000..a76ad1cfa89c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUriFolderJobOutput.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningUriFolderJobOutput. + /// Serialized Name: UriFolderJobOutput + /// + public partial class MachineLearningUriFolderJobOutput : MachineLearningJobOutput + { + /// Initializes a new instance of MachineLearningUriFolderJobOutput. + public MachineLearningUriFolderJobOutput() + { + JobOutputType = JobOutputType.UriFolder; + } + + /// Initializes a new instance of MachineLearningUriFolderJobOutput. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + internal MachineLearningUriFolderJobOutput(string description, JobOutputType jobOutputType, MachineLearningOutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) + { + Mode = mode; + Uri = uri; + JobOutputType = jobOutputType; + } + + /// + /// Output Asset Delivery Mode. + /// Serialized Name: AssetJobOutput.mode + /// + public MachineLearningOutputDeliveryMode? Mode { get; set; } + /// + /// Output Asset URI. + /// Serialized Name: AssetJobOutput.uri + /// + public Uri Uri { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.Serialization.cs index 04b65f223c25..e56627ecd25a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.Serialization.cs @@ -17,10 +17,10 @@ internal static MachineLearningUsage DeserializeMachineLearningUsage(JsonElement Optional id = default; Optional amlWorkspaceLocation = default; Optional type = default; - Optional unit = default; + Optional unit = default; Optional currentValue = default; Optional limit = default; - Optional name = default; + Optional name = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("id")) @@ -45,7 +45,7 @@ internal static MachineLearningUsage DeserializeMachineLearningUsage(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - unit = new UsageUnit(property.Value.GetString()); + unit = new MachineLearningUsageUnit(property.Value.GetString()); continue; } if (property.NameEquals("currentValue")) @@ -75,7 +75,7 @@ internal static MachineLearningUsage DeserializeMachineLearningUsage(JsonElement property.ThrowNonNullablePropertyIsNull(); continue; } - name = UsageName.DeserializeUsageName(property.Value); + name = MachineLearningUsageName.DeserializeMachineLearningUsageName(property.Value); continue; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.cs index b0fb03f014e6..1914b3d77adf 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsage.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Describes AML Resource Usage. + /// + /// Describes AML Resource Usage. + /// Serialized Name: Usage + /// public partial class MachineLearningUsage { /// Initializes a new instance of MachineLearningUsage. @@ -16,14 +19,35 @@ internal MachineLearningUsage() } /// Initializes a new instance of MachineLearningUsage. - /// 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. - internal MachineLearningUsage(string id, string amlWorkspaceLocation, string usageType, UsageUnit? unit, long? currentValue, long? limit, UsageName name) + /// + /// Specifies the resource ID. + /// Serialized Name: Usage.id + /// + /// + /// Region of the AML workspace in the id. + /// Serialized Name: Usage.amlWorkspaceLocation + /// + /// + /// Specifies the resource type. + /// Serialized Name: Usage.type + /// + /// + /// An enum describing the unit of usage measurement. + /// Serialized Name: Usage.unit + /// + /// + /// The current usage of the resource. + /// Serialized Name: Usage.currentValue + /// + /// + /// The maximum permitted usage of the resource. + /// Serialized Name: Usage.limit + /// + /// + /// The name of the type of usage. + /// Serialized Name: Usage.name + /// + internal MachineLearningUsage(string id, string amlWorkspaceLocation, string usageType, MachineLearningUsageUnit? unit, long? currentValue, long? limit, MachineLearningUsageName name) { Id = id; AmlWorkspaceLocation = amlWorkspaceLocation; @@ -34,19 +58,40 @@ internal MachineLearningUsage(string id, string amlWorkspaceLocation, string usa Name = name; } - /// Specifies the resource ID. + /// + /// Specifies the resource ID. + /// Serialized Name: Usage.id + /// public string Id { get; } - /// Region of the AML workspace in the id. + /// + /// Region of the AML workspace in the id. + /// Serialized Name: Usage.amlWorkspaceLocation + /// public string AmlWorkspaceLocation { get; } - /// Specifies the resource type. + /// + /// Specifies the resource type. + /// Serialized Name: Usage.type + /// public string UsageType { get; } - /// An enum describing the unit of usage measurement. - public UsageUnit? Unit { get; } - /// The current usage of the resource. + /// + /// An enum describing the unit of usage measurement. + /// Serialized Name: Usage.unit + /// + public MachineLearningUsageUnit? Unit { get; } + /// + /// The current usage of the resource. + /// Serialized Name: Usage.currentValue + /// public long? CurrentValue { get; } - /// The maximum permitted usage of the resource. + /// + /// The maximum permitted usage of the resource. + /// Serialized Name: Usage.limit + /// public long? Limit { get; } - /// The name of the type of usage. - public UsageName Name { get; } + /// + /// The name of the type of usage. + /// Serialized Name: Usage.name + /// + public MachineLearningUsageName Name { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageName.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageName.Serialization.cs new file mode 100644 index 000000000000..d33acada6b52 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageName.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUsageName + { + internal static MachineLearningUsageName DeserializeMachineLearningUsageName(JsonElement element) + { + Optional value = default; + Optional localizedValue = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue")) + { + localizedValue = property.Value.GetString(); + continue; + } + } + return new MachineLearningUsageName(value.Value, localizedValue.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageName.cs new file mode 100644 index 000000000000..899cf84b3055 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageName.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The Usage Names. + /// Serialized Name: UsageName + /// + public partial class MachineLearningUsageName + { + /// Initializes a new instance of MachineLearningUsageName. + internal MachineLearningUsageName() + { + } + + /// Initializes a new instance of MachineLearningUsageName. + /// + /// The name of the resource. + /// Serialized Name: UsageName.value + /// + /// + /// The localized name of the resource. + /// Serialized Name: UsageName.localizedValue + /// + internal MachineLearningUsageName(string value, string localizedValue) + { + Value = value; + LocalizedValue = localizedValue; + } + + /// + /// The name of the resource. + /// Serialized Name: UsageName.value + /// + public string Value { get; } + /// + /// The localized name of the resource. + /// Serialized Name: UsageName.localizedValue + /// + public string LocalizedValue { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageUnit.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageUnit.cs new file mode 100644 index 000000000000..98563a554116 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsageUnit.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// An enum describing the unit of usage measurement. + /// Serialized Name: UsageUnit + /// + public readonly partial struct MachineLearningUsageUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningUsageUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CountValue = "Count"; + + /// + /// Count + /// Serialized Name: UsageUnit.Count + /// + public static MachineLearningUsageUnit Count { get; } = new MachineLearningUsageUnit(CountValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningUsageUnit left, MachineLearningUsageUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningUsageUnit left, MachineLearningUsageUnit right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningUsageUnit(string value) => new MachineLearningUsageUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningUsageUnit other && Equals(other); + /// + public bool Equals(MachineLearningUsageUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUseStl.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUseStl.cs new file mode 100644 index 000000000000..25c978cef559 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUseStl.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Configure STL Decomposition of the time-series target column. + /// Serialized Name: UseStl + /// + public readonly partial struct MachineLearningUseStl : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningUseStl(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string SeasonValue = "Season"; + private const string SeasonTrendValue = "SeasonTrend"; + + /// + /// No stl decomposition. + /// Serialized Name: UseStl.None + /// + public static MachineLearningUseStl None { get; } = new MachineLearningUseStl(NoneValue); + /// + /// Season + /// Serialized Name: UseStl.Season + /// + public static MachineLearningUseStl Season { get; } = new MachineLearningUseStl(SeasonValue); + /// + /// SeasonTrend + /// Serialized Name: UseStl.SeasonTrend + /// + public static MachineLearningUseStl SeasonTrend { get; } = new MachineLearningUseStl(SeasonTrendValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningUseStl left, MachineLearningUseStl right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningUseStl left, MachineLearningUseStl right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningUseStl(string value) => new MachineLearningUseStl(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningUseStl other && Equals(other); + /// + public bool Equals(MachineLearningUseStl other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserAccountCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserAccountCredentials.Serialization.cs new file mode 100644 index 000000000000..7bba63395e87 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserAccountCredentials.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUserAccountCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("adminUserName"); + writer.WriteStringValue(AdminUserName); + if (Optional.IsDefined(AdminUserSshPublicKey)) + { + writer.WritePropertyName("adminUserSshPublicKey"); + writer.WriteStringValue(AdminUserSshPublicKey); + } + if (Optional.IsDefined(AdminUserPassword)) + { + writer.WritePropertyName("adminUserPassword"); + writer.WriteStringValue(AdminUserPassword); + } + writer.WriteEndObject(); + } + + internal static MachineLearningUserAccountCredentials DeserializeMachineLearningUserAccountCredentials(JsonElement element) + { + string adminUserName = default; + Optional adminUserSshPublicKey = default; + Optional adminUserPassword = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("adminUserName")) + { + adminUserName = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminUserSshPublicKey")) + { + adminUserSshPublicKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("adminUserPassword")) + { + adminUserPassword = property.Value.GetString(); + continue; + } + } + return new MachineLearningUserAccountCredentials(adminUserName, adminUserSshPublicKey.Value, adminUserPassword.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserAccountCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserAccountCredentials.cs new file mode 100644 index 000000000000..3977d1dd488b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserAccountCredentials.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Settings for user account that gets created on each on the nodes of a compute. + /// Serialized Name: UserAccountCredentials + /// + public partial class MachineLearningUserAccountCredentials + { + /// Initializes a new instance of MachineLearningUserAccountCredentials. + /// + /// Name of the administrator user account which can be used to SSH to nodes. + /// Serialized Name: UserAccountCredentials.adminUserName + /// + /// is null. + public MachineLearningUserAccountCredentials(string adminUserName) + { + Argument.AssertNotNull(adminUserName, nameof(adminUserName)); + + AdminUserName = adminUserName; + } + + /// Initializes a new instance of MachineLearningUserAccountCredentials. + /// + /// Name of the administrator user account which can be used to SSH to nodes. + /// Serialized Name: UserAccountCredentials.adminUserName + /// + /// + /// SSH public key of the administrator user account. + /// Serialized Name: UserAccountCredentials.adminUserSshPublicKey + /// + /// + /// Password of the administrator user account. + /// Serialized Name: UserAccountCredentials.adminUserPassword + /// + internal MachineLearningUserAccountCredentials(string adminUserName, string adminUserSshPublicKey, string adminUserPassword) + { + AdminUserName = adminUserName; + AdminUserSshPublicKey = adminUserSshPublicKey; + AdminUserPassword = adminUserPassword; + } + + /// + /// Name of the administrator user account which can be used to SSH to nodes. + /// Serialized Name: UserAccountCredentials.adminUserName + /// + public string AdminUserName { get; set; } + /// + /// SSH public key of the administrator user account. + /// Serialized Name: UserAccountCredentials.adminUserSshPublicKey + /// + public string AdminUserSshPublicKey { get; set; } + /// + /// Password of the administrator user account. + /// Serialized Name: UserAccountCredentials.adminUserPassword + /// + public string AdminUserPassword { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserFeature.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserFeature.Serialization.cs new file mode 100644 index 000000000000..09d46d01acf4 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserFeature.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUserFeature + { + internal static MachineLearningUserFeature DeserializeMachineLearningUserFeature(JsonElement element) + { + Optional id = default; + Optional displayName = default; + Optional description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName")) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description")) + { + description = property.Value.GetString(); + continue; + } + } + return new MachineLearningUserFeature(id.Value, displayName.Value, description.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserFeature.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserFeature.cs new file mode 100644 index 000000000000..e1349a790348 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserFeature.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Features enabled for a workspace + /// Serialized Name: AmlUserFeature + /// + public partial class MachineLearningUserFeature + { + /// Initializes a new instance of MachineLearningUserFeature. + internal MachineLearningUserFeature() + { + } + + /// Initializes a new instance of MachineLearningUserFeature. + /// + /// Specifies the feature ID + /// Serialized Name: AmlUserFeature.id + /// + /// + /// Specifies the feature name + /// Serialized Name: AmlUserFeature.displayName + /// + /// + /// Describes the feature for user experience + /// Serialized Name: AmlUserFeature.description + /// + internal MachineLearningUserFeature(string id, string displayName, string description) + { + Id = id; + DisplayName = displayName; + Description = description; + } + + /// + /// Specifies the feature ID + /// Serialized Name: AmlUserFeature.id + /// + public string Id { get; } + /// + /// Specifies the feature name + /// Serialized Name: AmlUserFeature.displayName + /// + public string DisplayName { get; } + /// + /// Describes the feature for user experience + /// Serialized Name: AmlUserFeature.description + /// + public string Description { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserIdentity.Serialization.cs new file mode 100644 index 000000000000..d4298ae35202 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserIdentity.Serialization.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUserIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("identityType"); + writer.WriteStringValue(IdentityType.ToString()); + writer.WriteEndObject(); + } + + internal static MachineLearningUserIdentity DeserializeMachineLearningUserIdentity(JsonElement element) + { + IdentityConfigurationType identityType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identityType")) + { + identityType = new IdentityConfigurationType(property.Value.GetString()); + continue; + } + } + return new MachineLearningUserIdentity(identityType); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserIdentity.cs new file mode 100644 index 000000000000..1665f18ea769 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUserIdentity.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// User identity configuration. + /// Serialized Name: UserIdentity + /// + public partial class MachineLearningUserIdentity : MachineLearningIdentityConfiguration + { + /// Initializes a new instance of MachineLearningUserIdentity. + public MachineLearningUserIdentity() + { + IdentityType = IdentityConfigurationType.UserIdentity; + } + + /// Initializes a new instance of MachineLearningUserIdentity. + /// + /// [Required] Specifies the type of identity framework. + /// Serialized Name: IdentityConfiguration.identityType + /// + internal MachineLearningUserIdentity(IdentityConfigurationType identityType) : base(identityType) + { + IdentityType = identityType; + } + } +} 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 new file mode 100644 index 000000000000..c46ece648b4b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.Serialization.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningUsernamePasswordAuthTypeWorkspaceConnection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Credentials)) + { + writer.WritePropertyName("credentials"); + writer.WriteObjectValue(Credentials); + } + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningUsernamePasswordAuthTypeWorkspaceConnection DeserializeMachineLearningUsernamePasswordAuthTypeWorkspaceConnection(JsonElement element) + { + Optional credentials = default; + MachineLearningConnectionAuthType authType = default; + Optional category = default; + Optional target = default; + Optional value = default; + Optional valueFormat = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("credentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + credentials = MachineLearningWorkspaceConnectionUsernamePassword.DeserializeMachineLearningWorkspaceConnectionUsernamePassword(property.Value); + continue; + } + if (property.NameEquals("authType")) + { + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); + continue; + } + if (property.NameEquals("category")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + category = new MachineLearningConnectionCategory(property.Value.GetString()); + continue; + } + if (property.NameEquals("target")) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("value")) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("valueFormat")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); + continue; + } + } + return new MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs new file mode 100644 index 000000000000..737822f649fd --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningUsernamePasswordAuthTypeWorkspaceConnection. + /// Serialized Name: UsernamePasswordAuthTypeWorkspaceConnectionProperties + /// + public partial class MachineLearningUsernamePasswordAuthTypeWorkspaceConnection : MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of MachineLearningUsernamePasswordAuthTypeWorkspaceConnection. + public MachineLearningUsernamePasswordAuthTypeWorkspaceConnection() + { + AuthType = MachineLearningConnectionAuthType.UsernamePassword; + } + + /// Initializes a new instance of MachineLearningUsernamePasswordAuthTypeWorkspaceConnection. + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + /// Serialized Name: UsernamePasswordAuthTypeWorkspaceConnectionProperties.credentials. + internal MachineLearningUsernamePasswordAuthTypeWorkspaceConnection(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat, MachineLearningWorkspaceConnectionUsernamePassword credentials) : base(authType, category, target, value, valueFormat) + { + Credentials = credentials; + AuthType = authType; + } + + /// Serialized Name: UsernamePasswordAuthTypeWorkspaceConnectionProperties.credentials. + public MachineLearningWorkspaceConnectionUsernamePassword Credentials { get; set; } + } +} 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 000000000000..d00b1cc6fb7e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningValueFormat.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// format for the workspace connection value + /// Serialized Name: ValueFormat + /// + public readonly partial struct MachineLearningValueFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningValueFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string JsonValue = "JSON"; + + /// + /// JSON + /// Serialized Name: ValueFormat.JSON + /// + public static MachineLearningValueFormat Json { get; } = new MachineLearningValueFormat(JsonValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningValueFormat left, MachineLearningValueFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningValueFormat left, MachineLearningValueFormat right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningValueFormat(string value) => new MachineLearningValueFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningValueFormat other && Equals(other); + /// + public bool Equals(MachineLearningValueFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineCompute.Serialization.cs new file mode 100644 index 000000000000..d45b4d557d0a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineCompute.Serialization.cs @@ -0,0 +1,188 @@ +// 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 Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningVirtualMachineCompute : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + } + writer.WritePropertyName("computeType"); + writer.WriteStringValue(ComputeType.ToString()); + if (Optional.IsDefined(ComputeLocation)) + { + writer.WritePropertyName("computeLocation"); + writer.WriteStringValue(ComputeLocation); + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(ResourceId)) + { + if (ResourceId != null) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + else + { + writer.WriteNull("resourceId"); + } + } + if (Optional.IsDefined(DisableLocalAuth)) + { + writer.WritePropertyName("disableLocalAuth"); + writer.WriteBooleanValue(DisableLocalAuth.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningVirtualMachineCompute DeserializeMachineLearningVirtualMachineCompute(JsonElement element) + { + Optional properties = default; + ComputeType computeType = default; + Optional computeLocation = default; + Optional provisioningState = default; + Optional description = default; + Optional createdOn = default; + Optional modifiedOn = default; + Optional resourceId = default; + Optional> provisioningErrors = default; + Optional isAttachedCompute = default; + Optional disableLocalAuth = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + properties = MachineLearningVirtualMachineProperties.DeserializeMachineLearningVirtualMachineProperties(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("computeLocation")) + { + computeLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("description")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + createdOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("modifiedOn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + modifiedOn = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + resourceId = null; + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningErrors")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + provisioningErrors = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); + } + provisioningErrors = array; + continue; + } + if (property.NameEquals("isAttachedCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isAttachedCompute = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableLocalAuth")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + disableLocalAuth = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningVirtualMachineCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineCompute.cs new file mode 100644 index 000000000000..20351154f3ae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineCompute.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// A Machine Learning compute based on Azure Virtual Machines. + /// Serialized Name: VirtualMachine + /// + public partial class MachineLearningVirtualMachineCompute : MachineLearningComputeProperties + { + /// Initializes a new instance of MachineLearningVirtualMachineCompute. + public MachineLearningVirtualMachineCompute() + { + ComputeType = ComputeType.VirtualMachine; + } + + /// Initializes a new instance of MachineLearningVirtualMachineCompute. + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + /// Serialized Name: VirtualMachineSchema.properties. + internal MachineLearningVirtualMachineCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, MachineLearningVirtualMachineProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + { + Properties = properties; + ComputeType = computeType; + } + + /// Serialized Name: VirtualMachineSchema.properties. + public MachineLearningVirtualMachineProperties Properties { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineProperties.Serialization.cs new file mode 100644 index 000000000000..5111d1da0471 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineProperties.Serialization.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningVirtualMachineProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(VirtualMachineSize)) + { + writer.WritePropertyName("virtualMachineSize"); + writer.WriteStringValue(VirtualMachineSize); + } + if (Optional.IsDefined(SshPort)) + { + writer.WritePropertyName("sshPort"); + writer.WriteNumberValue(SshPort.Value); + } + if (Optional.IsDefined(NotebookServerPort)) + { + writer.WritePropertyName("notebookServerPort"); + writer.WriteNumberValue(NotebookServerPort.Value); + } + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"); + writer.WriteStringValue(Address); + } + if (Optional.IsDefined(AdministratorAccount)) + { + if (AdministratorAccount != null) + { + writer.WritePropertyName("administratorAccount"); + writer.WriteObjectValue(AdministratorAccount); + } + else + { + writer.WriteNull("administratorAccount"); + } + } + if (Optional.IsDefined(IsNotebookInstanceCompute)) + { + writer.WritePropertyName("isNotebookInstanceCompute"); + writer.WriteBooleanValue(IsNotebookInstanceCompute.Value); + } + writer.WriteEndObject(); + } + + internal static MachineLearningVirtualMachineProperties DeserializeMachineLearningVirtualMachineProperties(JsonElement element) + { + Optional virtualMachineSize = default; + Optional sshPort = default; + Optional notebookServerPort = default; + Optional address = default; + Optional administratorAccount = default; + Optional isNotebookInstanceCompute = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("virtualMachineSize")) + { + virtualMachineSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + sshPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("notebookServerPort")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + notebookServerPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("address")) + { + address = property.Value.GetString(); + continue; + } + if (property.NameEquals("administratorAccount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + administratorAccount = null; + continue; + } + administratorAccount = MachineLearningVmSshCredentials.DeserializeMachineLearningVmSshCredentials(property.Value); + continue; + } + if (property.NameEquals("isNotebookInstanceCompute")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + isNotebookInstanceCompute = property.Value.GetBoolean(); + continue; + } + } + return new MachineLearningVirtualMachineProperties(virtualMachineSize.Value, Optional.ToNullable(sshPort), Optional.ToNullable(notebookServerPort), address.Value, administratorAccount.Value, Optional.ToNullable(isNotebookInstanceCompute)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineProperties.cs new file mode 100644 index 000000000000..56b1bad5a9c1 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineProperties.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningVirtualMachineProperties. + /// Serialized Name: VirtualMachineSchemaProperties + /// + public partial class MachineLearningVirtualMachineProperties + { + /// Initializes a new instance of MachineLearningVirtualMachineProperties. + public MachineLearningVirtualMachineProperties() + { + } + + /// Initializes a new instance of MachineLearningVirtualMachineProperties. + /// + /// Virtual Machine size + /// Serialized Name: VirtualMachineSchemaProperties.virtualMachineSize + /// + /// + /// Port open for ssh connections. + /// Serialized Name: VirtualMachineSchemaProperties.sshPort + /// + /// + /// Notebook server port open for ssh connections. + /// Serialized Name: VirtualMachineSchemaProperties.notebookServerPort + /// + /// + /// Public IP address of the virtual machine. + /// Serialized Name: VirtualMachineSchemaProperties.address + /// + /// + /// Admin credentials for virtual machine + /// Serialized Name: VirtualMachineSchemaProperties.administratorAccount + /// + /// + /// Indicates whether this compute will be used for running notebooks. + /// Serialized Name: VirtualMachineSchemaProperties.isNotebookInstanceCompute + /// + internal MachineLearningVirtualMachineProperties(string virtualMachineSize, int? sshPort, int? notebookServerPort, string address, MachineLearningVmSshCredentials administratorAccount, bool? isNotebookInstanceCompute) + { + VirtualMachineSize = virtualMachineSize; + SshPort = sshPort; + NotebookServerPort = notebookServerPort; + Address = address; + AdministratorAccount = administratorAccount; + IsNotebookInstanceCompute = isNotebookInstanceCompute; + } + + /// + /// Virtual Machine size + /// Serialized Name: VirtualMachineSchemaProperties.virtualMachineSize + /// + public string VirtualMachineSize { get; set; } + /// + /// Port open for ssh connections. + /// Serialized Name: VirtualMachineSchemaProperties.sshPort + /// + public int? SshPort { get; set; } + /// + /// Notebook server port open for ssh connections. + /// Serialized Name: VirtualMachineSchemaProperties.notebookServerPort + /// + public int? NotebookServerPort { get; set; } + /// + /// Public IP address of the virtual machine. + /// Serialized Name: VirtualMachineSchemaProperties.address + /// + public string Address { get; set; } + /// + /// Admin credentials for virtual machine + /// Serialized Name: VirtualMachineSchemaProperties.administratorAccount + /// + public MachineLearningVmSshCredentials AdministratorAccount { get; set; } + /// + /// Indicates whether this compute will be used for running notebooks. + /// Serialized Name: VirtualMachineSchemaProperties.isNotebookInstanceCompute + /// + public bool? IsNotebookInstanceCompute { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineSecrets.Serialization.cs new file mode 100644 index 000000000000..4974c4a05e40 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineSecrets.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningVirtualMachineSecrets + { + internal static MachineLearningVirtualMachineSecrets DeserializeMachineLearningVirtualMachineSecrets(JsonElement element) + { + Optional administratorAccount = default; + ComputeType computeType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("administratorAccount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + administratorAccount = MachineLearningVmSshCredentials.DeserializeMachineLearningVmSshCredentials(property.Value); + continue; + } + if (property.NameEquals("computeType")) + { + computeType = new ComputeType(property.Value.GetString()); + continue; + } + } + return new MachineLearningVirtualMachineSecrets(computeType, administratorAccount.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineSecrets.cs new file mode 100644 index 000000000000..559d52a64e28 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVirtualMachineSecrets.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Secrets related to a Machine Learning compute based on AKS. + /// Serialized Name: VirtualMachineSecrets + /// + public partial class MachineLearningVirtualMachineSecrets : MachineLearningComputeSecrets + { + /// Initializes a new instance of MachineLearningVirtualMachineSecrets. + internal MachineLearningVirtualMachineSecrets() + { + ComputeType = ComputeType.VirtualMachine; + } + + /// Initializes a new instance of MachineLearningVirtualMachineSecrets. + /// + /// The type of compute + /// Serialized Name: ComputeSecrets.computeType + /// + /// + /// Admin credentials for virtual machine. + /// Serialized Name: VirtualMachineSecretsSchema.administratorAccount + /// + internal MachineLearningVirtualMachineSecrets(ComputeType computeType, MachineLearningVmSshCredentials administratorAccount) : base(computeType) + { + AdministratorAccount = administratorAccount; + ComputeType = computeType; + } + + /// + /// Admin credentials for virtual machine. + /// Serialized Name: VirtualMachineSecretsSchema.administratorAccount + /// + public MachineLearningVmSshCredentials AdministratorAccount { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmPriceOSType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmPriceOSType.cs new file mode 100644 index 000000000000..29a79ee3277e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmPriceOSType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Operating system type used by the VM. + /// Serialized Name: VMPriceOSType + /// + public readonly partial struct MachineLearningVmPriceOSType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningVmPriceOSType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string LinuxValue = "Linux"; + private const string WindowsValue = "Windows"; + + /// + /// Linux + /// Serialized Name: VMPriceOSType.Linux + /// + public static MachineLearningVmPriceOSType Linux { get; } = new MachineLearningVmPriceOSType(LinuxValue); + /// + /// Windows + /// Serialized Name: VMPriceOSType.Windows + /// + public static MachineLearningVmPriceOSType Windows { get; } = new MachineLearningVmPriceOSType(WindowsValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningVmPriceOSType left, MachineLearningVmPriceOSType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningVmPriceOSType left, MachineLearningVmPriceOSType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningVmPriceOSType(string value) => new MachineLearningVmPriceOSType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningVmPriceOSType other && Equals(other); + /// + public bool Equals(MachineLearningVmPriceOSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmPriority.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmPriority.cs new file mode 100644 index 000000000000..18a8b3ef5c0e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmPriority.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Virtual Machine priority + /// Serialized Name: VmPriority + /// + public readonly partial struct MachineLearningVmPriority : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningVmPriority(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DedicatedValue = "Dedicated"; + private const string LowPriorityValue = "LowPriority"; + + /// + /// Dedicated + /// Serialized Name: VmPriority.Dedicated + /// + public static MachineLearningVmPriority Dedicated { get; } = new MachineLearningVmPriority(DedicatedValue); + /// + /// LowPriority + /// Serialized Name: VmPriority.LowPriority + /// + public static MachineLearningVmPriority LowPriority { get; } = new MachineLearningVmPriority(LowPriorityValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningVmPriority left, MachineLearningVmPriority right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningVmPriority left, MachineLearningVmPriority right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningVmPriority(string value) => new MachineLearningVmPriority(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningVmPriority other && Equals(other); + /// + public bool Equals(MachineLearningVmPriority other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSize.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSize.Serialization.cs new file mode 100644 index 000000000000..413974dd3b9e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSize.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningVmSize + { + internal static MachineLearningVmSize DeserializeMachineLearningVmSize(JsonElement element) + { + Optional name = default; + Optional family = default; + Optional vcpUs = default; + Optional gpus = default; + Optional osVhdSizeMB = default; + Optional maxResourceVolumeMB = default; + Optional memoryGB = default; + Optional lowPriorityCapable = default; + Optional premiumIO = default; + Optional estimatedVmPrices = default; + Optional> supportedComputeTypes = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("family")) + { + family = property.Value.GetString(); + continue; + } + if (property.NameEquals("vCPUs")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + vcpUs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("gpus")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + gpus = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("osVhdSizeMB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + osVhdSizeMB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxResourceVolumeMB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + maxResourceVolumeMB = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryGB")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + memoryGB = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("lowPriorityCapable")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + lowPriorityCapable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("premiumIO")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + premiumIO = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("estimatedVMPrices")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + estimatedVmPrices = MachineLearningEstimatedVmPrices.DeserializeMachineLearningEstimatedVmPrices(property.Value); + continue; + } + if (property.NameEquals("supportedComputeTypes")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedComputeTypes = array; + continue; + } + } + return new MachineLearningVmSize(name.Value, family.Value, Optional.ToNullable(vcpUs), Optional.ToNullable(gpus), Optional.ToNullable(osVhdSizeMB), Optional.ToNullable(maxResourceVolumeMB), Optional.ToNullable(memoryGB), Optional.ToNullable(lowPriorityCapable), Optional.ToNullable(premiumIO), estimatedVmPrices.Value, Optional.ToList(supportedComputeTypes)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSize.cs new file mode 100644 index 000000000000..d0f709ce901a --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSize.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Describes the properties of a VM size. + /// Serialized Name: VirtualMachineSize + /// + public partial class MachineLearningVmSize + { + /// Initializes a new instance of MachineLearningVmSize. + internal MachineLearningVmSize() + { + SupportedComputeTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of MachineLearningVmSize. + /// + /// The name of the virtual machine size. + /// Serialized Name: VirtualMachineSize.name + /// + /// + /// The family name of the virtual machine size. + /// Serialized Name: VirtualMachineSize.family + /// + /// + /// The number of vCPUs supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.vCPUs + /// + /// + /// The number of gPUs supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.gpus + /// + /// + /// The OS VHD disk size, in MB, allowed by the virtual machine size. + /// Serialized Name: VirtualMachineSize.osVhdSizeMB + /// + /// + /// The resource volume size, in MB, allowed by the virtual machine size. + /// Serialized Name: VirtualMachineSize.maxResourceVolumeMB + /// + /// + /// The amount of memory, in GB, supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.memoryGB + /// + /// + /// Specifies if the virtual machine size supports low priority VMs. + /// Serialized Name: VirtualMachineSize.lowPriorityCapable + /// + /// + /// Specifies if the virtual machine size supports premium IO. + /// Serialized Name: VirtualMachineSize.premiumIO + /// + /// + /// The estimated price information for using a VM. + /// Serialized Name: VirtualMachineSize.estimatedVMPrices + /// + /// + /// Specifies the compute types supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.supportedComputeTypes + /// + internal MachineLearningVmSize(string name, string family, int? vcpUs, int? gpus, int? osVhdSizeMB, int? maxResourceVolumeMB, double? memoryGB, bool? lowPriorityCapable, bool? premiumIO, MachineLearningEstimatedVmPrices estimatedVmPrices, IReadOnlyList supportedComputeTypes) + { + Name = name; + Family = family; + VCPUs = vcpUs; + Gpus = gpus; + OSVhdSizeMB = osVhdSizeMB; + MaxResourceVolumeMB = maxResourceVolumeMB; + MemoryGB = memoryGB; + LowPriorityCapable = lowPriorityCapable; + PremiumIO = premiumIO; + EstimatedVmPrices = estimatedVmPrices; + SupportedComputeTypes = supportedComputeTypes; + } + + /// + /// The name of the virtual machine size. + /// Serialized Name: VirtualMachineSize.name + /// + public string Name { get; } + /// + /// The family name of the virtual machine size. + /// Serialized Name: VirtualMachineSize.family + /// + public string Family { get; } + /// + /// The number of vCPUs supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.vCPUs + /// + public int? VCPUs { get; } + /// + /// The number of gPUs supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.gpus + /// + public int? Gpus { get; } + /// + /// The OS VHD disk size, in MB, allowed by the virtual machine size. + /// Serialized Name: VirtualMachineSize.osVhdSizeMB + /// + public int? OSVhdSizeMB { get; } + /// + /// The resource volume size, in MB, allowed by the virtual machine size. + /// Serialized Name: VirtualMachineSize.maxResourceVolumeMB + /// + public int? MaxResourceVolumeMB { get; } + /// + /// The amount of memory, in GB, supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.memoryGB + /// + public double? MemoryGB { get; } + /// + /// Specifies if the virtual machine size supports low priority VMs. + /// Serialized Name: VirtualMachineSize.lowPriorityCapable + /// + public bool? LowPriorityCapable { get; } + /// + /// Specifies if the virtual machine size supports premium IO. + /// Serialized Name: VirtualMachineSize.premiumIO + /// + public bool? PremiumIO { get; } + /// + /// The estimated price information for using a VM. + /// Serialized Name: VirtualMachineSize.estimatedVMPrices + /// + public MachineLearningEstimatedVmPrices EstimatedVmPrices { get; } + /// + /// Specifies the compute types supported by the virtual machine size. + /// Serialized Name: VirtualMachineSize.supportedComputeTypes + /// + public IReadOnlyList SupportedComputeTypes { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSshCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSshCredentials.Serialization.cs new file mode 100644 index 000000000000..9788ee223da3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSshCredentials.Serialization.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningVmSshCredentials : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + if (Optional.IsDefined(PublicKeyData)) + { + writer.WritePropertyName("publicKeyData"); + writer.WriteStringValue(PublicKeyData); + } + if (Optional.IsDefined(PrivateKeyData)) + { + writer.WritePropertyName("privateKeyData"); + writer.WriteStringValue(PrivateKeyData); + } + writer.WriteEndObject(); + } + + internal static MachineLearningVmSshCredentials DeserializeMachineLearningVmSshCredentials(JsonElement element) + { + Optional username = default; + Optional password = default; + Optional publicKeyData = default; + Optional privateKeyData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicKeyData")) + { + publicKeyData = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateKeyData")) + { + privateKeyData = property.Value.GetString(); + continue; + } + } + return new MachineLearningVmSshCredentials(username.Value, password.Value, publicKeyData.Value, privateKeyData.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSshCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSshCredentials.cs new file mode 100644 index 000000000000..32a6099d4cdf --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmSshCredentials.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Admin credentials for virtual machine + /// Serialized Name: VirtualMachineSshCredentials + /// + public partial class MachineLearningVmSshCredentials + { + /// Initializes a new instance of MachineLearningVmSshCredentials. + public MachineLearningVmSshCredentials() + { + } + + /// Initializes a new instance of MachineLearningVmSshCredentials. + /// + /// Username of admin account + /// Serialized Name: VirtualMachineSshCredentials.username + /// + /// + /// Password of admin account + /// Serialized Name: VirtualMachineSshCredentials.password + /// + /// + /// Public key data + /// Serialized Name: VirtualMachineSshCredentials.publicKeyData + /// + /// + /// Private key data + /// Serialized Name: VirtualMachineSshCredentials.privateKeyData + /// + internal MachineLearningVmSshCredentials(string username, string password, string publicKeyData, string privateKeyData) + { + Username = username; + Password = password; + PublicKeyData = publicKeyData; + PrivateKeyData = privateKeyData; + } + + /// + /// Username of admin account + /// Serialized Name: VirtualMachineSshCredentials.username + /// + public string Username { get; set; } + /// + /// Password of admin account + /// Serialized Name: VirtualMachineSshCredentials.password + /// + public string Password { get; set; } + /// + /// Public key data + /// Serialized Name: VirtualMachineSshCredentials.publicKeyData + /// + public string PublicKeyData { get; set; } + /// + /// Private key data + /// Serialized Name: VirtualMachineSshCredentials.privateKeyData + /// + public string PrivateKeyData { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmTier.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmTier.cs new file mode 100644 index 000000000000..7d6c5e89bd27 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningVmTier.cs @@ -0,0 +1,66 @@ +// 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 type of the VM. + /// Serialized Name: VMTier + /// + public readonly partial struct MachineLearningVmTier : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningVmTier(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardValue = "Standard"; + private const string LowPriorityValue = "LowPriority"; + private const string SpotValue = "Spot"; + + /// + /// Standard + /// Serialized Name: VMTier.Standard + /// + public static MachineLearningVmTier Standard { get; } = new MachineLearningVmTier(StandardValue); + /// + /// LowPriority + /// Serialized Name: VMTier.LowPriority + /// + public static MachineLearningVmTier LowPriority { get; } = new MachineLearningVmTier(LowPriorityValue); + /// + /// Spot + /// Serialized Name: VMTier.Spot + /// + public static MachineLearningVmTier Spot { get; } = new MachineLearningVmTier(SpotValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningVmTier left, MachineLearningVmTier right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningVmTier left, MachineLearningVmTier right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningVmTier(string value) => new MachineLearningVmTier(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningVmTier other && Equals(other); + /// + public bool Equals(MachineLearningVmTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWeekday.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWeekday.cs new file mode 100644 index 000000000000..85eaf540d969 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWeekday.cs @@ -0,0 +1,90 @@ +// 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 of weekday + /// Serialized Name: WeekDay + /// + public readonly partial struct MachineLearningWeekday : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningWeekday(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MondayValue = "Monday"; + private const string TuesdayValue = "Tuesday"; + private const string WednesdayValue = "Wednesday"; + private const string ThursdayValue = "Thursday"; + private const string FridayValue = "Friday"; + private const string SaturdayValue = "Saturday"; + private const string SundayValue = "Sunday"; + + /// + /// Monday weekday + /// Serialized Name: WeekDay.Monday + /// + public static MachineLearningWeekday Monday { get; } = new MachineLearningWeekday(MondayValue); + /// + /// Tuesday weekday + /// Serialized Name: WeekDay.Tuesday + /// + public static MachineLearningWeekday Tuesday { get; } = new MachineLearningWeekday(TuesdayValue); + /// + /// Wednesday weekday + /// Serialized Name: WeekDay.Wednesday + /// + public static MachineLearningWeekday Wednesday { get; } = new MachineLearningWeekday(WednesdayValue); + /// + /// Thursday weekday + /// Serialized Name: WeekDay.Thursday + /// + public static MachineLearningWeekday Thursday { get; } = new MachineLearningWeekday(ThursdayValue); + /// + /// Friday weekday + /// Serialized Name: WeekDay.Friday + /// + public static MachineLearningWeekday Friday { get; } = new MachineLearningWeekday(FridayValue); + /// + /// Saturday weekday + /// Serialized Name: WeekDay.Saturday + /// + public static MachineLearningWeekday Saturday { get; } = new MachineLearningWeekday(SaturdayValue); + /// + /// Sunday weekday + /// Serialized Name: WeekDay.Sunday + /// + public static MachineLearningWeekday Sunday { get; } = new MachineLearningWeekday(SundayValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningWeekday left, MachineLearningWeekday right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningWeekday left, MachineLearningWeekday right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningWeekday(string value) => new MachineLearningWeekday(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningWeekday other && Equals(other); + /// + public bool Equals(MachineLearningWeekday other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionData.Serialization.cs new file mode 100644 index 000000000000..5de56182de43 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionData.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.MachineLearning.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MachineLearning +{ + public partial class MachineLearningWorkspaceConnectionData : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("properties"); + writer.WriteObjectValue(Properties); + writer.WriteEndObject(); + } + + internal static MachineLearningWorkspaceConnectionData DeserializeMachineLearningWorkspaceConnectionData(JsonElement element) + { + MachineLearningWorkspaceConnectionProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + Optional systemData = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties")) + { + properties = MachineLearningWorkspaceConnectionProperties.DeserializeMachineLearningWorkspaceConnectionProperties(property.Value); + continue; + } + if (property.NameEquals("id")) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name")) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.ToString()); + continue; + } + } + return new MachineLearningWorkspaceConnectionData(id, name, type, systemData.Value, properties); + } + } +} 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 new file mode 100644 index 000000000000..8e609c0585f5 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceConnectionManagedIdentity : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"); + writer.WriteStringValue(ClientId); + } + writer.WriteEndObject(); + } + + internal static MachineLearningWorkspaceConnectionManagedIdentity DeserializeMachineLearningWorkspaceConnectionManagedIdentity(JsonElement element) + { + Optional resourceId = default; + Optional clientId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("clientId")) + { + clientId = property.Value.GetString(); + continue; + } + } + return new MachineLearningWorkspaceConnectionManagedIdentity(resourceId.Value, clientId.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs new file mode 100644 index 000000000000..1e6f72a42918 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionManagedIdentity.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceConnectionManagedIdentity. + /// Serialized Name: WorkspaceConnectionManagedIdentity + /// + public partial class MachineLearningWorkspaceConnectionManagedIdentity + { + /// Initializes a new instance of MachineLearningWorkspaceConnectionManagedIdentity. + public MachineLearningWorkspaceConnectionManagedIdentity() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceConnectionManagedIdentity. + /// Serialized Name: WorkspaceConnectionManagedIdentity.resourceId. + /// Serialized Name: WorkspaceConnectionManagedIdentity.clientId. + internal MachineLearningWorkspaceConnectionManagedIdentity(ResourceIdentifier resourceId, string clientId) + { + ResourceId = resourceId; + ClientId = clientId; + } + + /// Serialized Name: WorkspaceConnectionManagedIdentity.resourceId. + public ResourceIdentifier ResourceId { get; set; } + /// Serialized Name: WorkspaceConnectionManagedIdentity.clientId. + public string ClientId { 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 new file mode 100644 index 000000000000..ffd9a57be480 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.Serialization.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceConnectionProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("authType"); + writer.WriteStringValue(AuthType.ToString()); + if (Optional.IsDefined(Category)) + { + writer.WritePropertyName("category"); + writer.WriteStringValue(Category.Value.ToString()); + } + if (Optional.IsDefined(Target)) + { + writer.WritePropertyName("target"); + writer.WriteStringValue(Target); + } + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(ValueFormat)) + { + writer.WritePropertyName("valueFormat"); + writer.WriteStringValue(ValueFormat.Value.ToString()); + } + writer.WriteEndObject(); + } + + internal static MachineLearningWorkspaceConnectionProperties DeserializeMachineLearningWorkspaceConnectionProperties(JsonElement element) + { + if (element.TryGetProperty("authType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ManagedIdentity": return MachineLearningManagedIdentityAuthTypeWorkspaceConnection.DeserializeMachineLearningManagedIdentityAuthTypeWorkspaceConnection(element); + case "None": return MachineLearningNoneAuthTypeWorkspaceConnection.DeserializeMachineLearningNoneAuthTypeWorkspaceConnection(element); + case "PAT": return MachineLearningPatAuthTypeWorkspaceConnection.DeserializeMachineLearningPatAuthTypeWorkspaceConnection(element); + case "SAS": return MachineLearningSasAuthTypeWorkspaceConnection.DeserializeMachineLearningSasAuthTypeWorkspaceConnection(element); + case "UsernamePassword": return MachineLearningUsernamePasswordAuthTypeWorkspaceConnection.DeserializeMachineLearningUsernamePasswordAuthTypeWorkspaceConnection(element); + } + } + return UnknownWorkspaceConnectionPropertiesV2.DeserializeUnknownWorkspaceConnectionPropertiesV2(element); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs new file mode 100644 index 000000000000..c27b04b14cbe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionProperties.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceConnectionProperties. + /// Serialized Name: WorkspaceConnectionPropertiesV2 + /// Please note is the base class. According to the scenario, a derived class 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 MachineLearningWorkspaceConnectionProperties + { + /// Initializes a new instance of MachineLearningWorkspaceConnectionProperties. + protected MachineLearningWorkspaceConnectionProperties() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceConnectionProperties. + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + internal MachineLearningWorkspaceConnectionProperties(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat) + { + AuthType = authType; + Category = category; + Target = target; + Value = value; + ValueFormat = valueFormat; + } + + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + internal MachineLearningConnectionAuthType AuthType { get; set; } + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + public MachineLearningConnectionCategory? Category { get; set; } + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + public string Target { get; set; } + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + public string Value { get; set; } + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + public MachineLearningValueFormat? ValueFormat { 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 new file mode 100644 index 000000000000..016cb68cc9dc --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.Serialization.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceConnectionUsernamePassword : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Username)) + { + writer.WritePropertyName("username"); + writer.WriteStringValue(Username); + } + if (Optional.IsDefined(Password)) + { + writer.WritePropertyName("password"); + writer.WriteStringValue(Password); + } + writer.WriteEndObject(); + } + + internal static MachineLearningWorkspaceConnectionUsernamePassword DeserializeMachineLearningWorkspaceConnectionUsernamePassword(JsonElement element) + { + Optional username = default; + Optional password = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("username")) + { + username = property.Value.GetString(); + continue; + } + if (property.NameEquals("password")) + { + password = property.Value.GetString(); + continue; + } + } + return new MachineLearningWorkspaceConnectionUsernamePassword(username.Value, password.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs new file mode 100644 index 000000000000..a7c14493a9ba --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceConnectionUsernamePassword.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceConnectionUsernamePassword. + /// Serialized Name: WorkspaceConnectionUsernamePassword + /// + public partial class MachineLearningWorkspaceConnectionUsernamePassword + { + /// Initializes a new instance of MachineLearningWorkspaceConnectionUsernamePassword. + public MachineLearningWorkspaceConnectionUsernamePassword() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceConnectionUsernamePassword. + /// Serialized Name: WorkspaceConnectionUsernamePassword.username. + /// Serialized Name: WorkspaceConnectionUsernamePassword.password. + internal MachineLearningWorkspaceConnectionUsernamePassword(string username, string password) + { + Username = username; + Password = password; + } + + /// Serialized Name: WorkspaceConnectionUsernamePassword.username. + public string Username { get; set; } + /// Serialized Name: WorkspaceConnectionUsernamePassword.password. + public string Password { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs index cbd3d84cde81..acb20c15ad7a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceData.Serialization.cs @@ -132,10 +132,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("primaryUserAssignedIdentity"); writer.WriteStringValue(PrimaryUserAssignedIdentity); } - if (Optional.IsDefined(V1LegacyMode)) + if (Optional.IsDefined(IsV1LegacyMode)) { writer.WritePropertyName("v1LegacyMode"); - writer.WriteBooleanValue(V1LegacyMode.Value); + writer.WriteBooleanValue(IsV1LegacyMode.Value); } writer.WriteEndObject(); writer.WriteEndObject(); @@ -159,17 +159,17 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace Optional containerRegistry = default; Optional storageAccount = default; Optional discoveryUrl = default; - Optional provisioningState = default; - Optional encryption = default; + Optional provisioningState = default; + Optional encryption = default; Optional hbiWorkspace = default; Optional serviceProvisionedResourceGroup = default; Optional privateLinkCount = default; Optional imageBuildCompute = default; Optional allowPublicAccessWhenBehindVnet = default; - Optional publicNetworkAccess = default; + Optional publicNetworkAccess = default; Optional> privateEndpointConnections = default; - Optional> sharedPrivateLinkResources = default; - Optional notebookInfo = default; + Optional> sharedPrivateLinkResources = default; + Optional notebookInfo = default; Optional serviceManagedResourcesSettings = default; Optional primaryUserAssignedIdentity = default; Optional tenantId = default; @@ -310,7 +310,7 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace property0.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = new ProvisioningState(property0.Value.GetString()); + provisioningState = new MachineLearningProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("encryption")) @@ -320,7 +320,7 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace property0.ThrowNonNullablePropertyIsNull(); continue; } - encryption = EncryptionProperty.DeserializeEncryptionProperty(property0.Value); + encryption = MachineLearningEncryptionSetting.DeserializeMachineLearningEncryptionSetting(property0.Value); continue; } if (property0.NameEquals("hbiWorkspace")) @@ -370,7 +370,7 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace property0.ThrowNonNullablePropertyIsNull(); continue; } - publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString()); + publicNetworkAccess = new MachineLearningPublicNetworkAccess(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpointConnections")) @@ -395,10 +395,10 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace property0.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(SharedPrivateLinkResource.DeserializeSharedPrivateLinkResource(item)); + array.Add(MachineLearningSharedPrivateLinkResource.DeserializeMachineLearningSharedPrivateLinkResource(item)); } sharedPrivateLinkResources = array; continue; @@ -410,7 +410,7 @@ internal static MachineLearningWorkspaceData DeserializeMachineLearningWorkspace property0.ThrowNonNullablePropertyIsNull(); continue; } - notebookInfo = NotebookResourceInfo.DeserializeNotebookResourceInfo(property0.Value); + notebookInfo = MachineLearningNotebookResourceInfo.DeserializeMachineLearningNotebookResourceInfo(property0.Value); continue; } if (property0.NameEquals("serviceManagedResourcesSettings")) diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.Serialization.cs new file mode 100644 index 000000000000..29e66ec614ec --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceDiagnoseContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"); + writer.WriteObjectValue(Value); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs new file mode 100644 index 000000000000..c9faf83bb7ae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseContent.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Parameters to diagnose a workspace + /// Serialized Name: DiagnoseWorkspaceParameters + /// + public partial class MachineLearningWorkspaceDiagnoseContent + { + /// Initializes a new instance of MachineLearningWorkspaceDiagnoseContent. + public MachineLearningWorkspaceDiagnoseContent() + { + } + + /// + /// Value of Parameters + /// Serialized Name: DiagnoseWorkspaceParameters.value + /// + 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 new file mode 100644 index 000000000000..a6ae51c5c322 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.Serialization.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceDiagnoseProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Udr)) + { + writer.WritePropertyName("udr"); + writer.WriteStartObject(); + foreach (var item in Udr) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Nsg)) + { + writer.WritePropertyName("nsg"); + writer.WriteStartObject(); + foreach (var item in Nsg) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ResourceLock)) + { + writer.WritePropertyName("resourceLock"); + writer.WriteStartObject(); + foreach (var item in ResourceLock) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(DnsResolution)) + { + writer.WritePropertyName("dnsResolution"); + writer.WriteStartObject(); + foreach (var item in DnsResolution) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(StorageAccount)) + { + writer.WritePropertyName("storageAccount"); + writer.WriteStartObject(); + foreach (var item in StorageAccount) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(KeyVault)) + { + writer.WritePropertyName("keyVault"); + writer.WriteStartObject(); + foreach (var item in KeyVault) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ContainerRegistry)) + { + writer.WritePropertyName("containerRegistry"); + writer.WriteStartObject(); + foreach (var item in ContainerRegistry) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(ApplicationInsights)) + { + writer.WritePropertyName("applicationInsights"); + writer.WriteStartObject(); + foreach (var item in ApplicationInsights) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(Others)) + { + writer.WritePropertyName("others"); + writer.WriteStartObject(); + foreach (var item in Others) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs new file mode 100644 index 000000000000..4acb10e93dae --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseProperties.cs @@ -0,0 +1,323 @@ +// 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 MachineLearningWorkspaceDiagnoseProperties. + /// Serialized Name: DiagnoseRequestProperties + /// + public partial class MachineLearningWorkspaceDiagnoseProperties + { + /// Initializes a new instance of MachineLearningWorkspaceDiagnoseProperties. + public MachineLearningWorkspaceDiagnoseProperties() + { + Udr = new ChangeTrackingDictionary(); + Nsg = new ChangeTrackingDictionary(); + ResourceLock = new ChangeTrackingDictionary(); + DnsResolution = new ChangeTrackingDictionary(); + StorageAccount = new ChangeTrackingDictionary(); + KeyVault = new ChangeTrackingDictionary(); + ContainerRegistry = new ChangeTrackingDictionary(); + ApplicationInsights = new ChangeTrackingDictionary(); + Others = new ChangeTrackingDictionary(); + } + + /// + /// Setting for diagnosing user defined routing + /// Serialized Name: DiagnoseRequestProperties.udr + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 Udr { get; } + /// + /// Setting for diagnosing network security group + /// Serialized Name: DiagnoseRequestProperties.nsg + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 Nsg { get; } + /// + /// Setting for diagnosing resource lock + /// Serialized Name: DiagnoseRequestProperties.resourceLock + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 ResourceLock { get; } + /// + /// Setting for diagnosing dns resolution + /// Serialized Name: DiagnoseRequestProperties.dnsResolution + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 DnsResolution { get; } + /// + /// Setting for diagnosing dependent storage account + /// Serialized Name: DiagnoseRequestProperties.storageAccount + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 StorageAccount { get; } + /// + /// Setting for diagnosing dependent key vault + /// Serialized Name: DiagnoseRequestProperties.keyVault + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 KeyVault { get; } + /// + /// Setting for diagnosing dependent container registry + /// Serialized Name: DiagnoseRequestProperties.containerRegistry + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 ContainerRegistry { get; } + /// + /// Setting for diagnosing dependent application insights + /// Serialized Name: DiagnoseRequestProperties.applicationInsights + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 unclassified category of problems + /// Serialized Name: DiagnoseRequestProperties.others + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formated 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 Others { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseResult.Serialization.cs new file mode 100644 index 000000000000..5d8ef5da2bc7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseResult.Serialization.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceDiagnoseResult + { + internal static MachineLearningWorkspaceDiagnoseResult DeserializeMachineLearningWorkspaceDiagnoseResult(JsonElement element) + { + Optional value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + value = MachineLearningDiagnoseResultValue.DeserializeMachineLearningDiagnoseResultValue(property.Value); + continue; + } + } + return new MachineLearningWorkspaceDiagnoseResult(value.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseResult.cs new file mode 100644 index 000000000000..18dc7d342c18 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceDiagnoseResult.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceDiagnoseResult. + /// Serialized Name: DiagnoseResponseResult + /// + public partial class MachineLearningWorkspaceDiagnoseResult + { + /// Initializes a new instance of MachineLearningWorkspaceDiagnoseResult. + internal MachineLearningWorkspaceDiagnoseResult() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceDiagnoseResult. + /// Serialized Name: DiagnoseResponseResult.value. + internal MachineLearningWorkspaceDiagnoseResult(MachineLearningDiagnoseResultValue value) + { + Value = value; + } + + /// Serialized Name: DiagnoseResponseResult.value. + public MachineLearningDiagnoseResultValue Value { 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 new file mode 100644 index 000000000000..12084c7e52f7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.Serialization.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceGetKeysResult + { + internal static MachineLearningWorkspaceGetKeysResult DeserializeMachineLearningWorkspaceGetKeysResult(JsonElement element) + { + Optional userStorageKey = default; + Optional userStorageResourceId = default; + Optional appInsightsInstrumentationKey = default; + Optional containerRegistryCredentials = default; + Optional notebookAccessKeys = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userStorageKey")) + { + userStorageKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("userStorageResourceId")) + { + userStorageResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("appInsightsInstrumentationKey")) + { + appInsightsInstrumentationKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerRegistryCredentials")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + containerRegistryCredentials = MachineLearningContainerRegistryCredentials.DeserializeMachineLearningContainerRegistryCredentials(property.Value); + continue; + } + if (property.NameEquals("notebookAccessKeys")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + notebookAccessKeys = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(property.Value); + continue; + } + } + return new MachineLearningWorkspaceGetKeysResult(userStorageKey.Value, userStorageResourceId.Value, appInsightsInstrumentationKey.Value, containerRegistryCredentials.Value, notebookAccessKeys.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs new file mode 100644 index 000000000000..d42ba551e2fe --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetKeysResult.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceGetKeysResult. + /// Serialized Name: ListWorkspaceKeysResult + /// + public partial class MachineLearningWorkspaceGetKeysResult + { + /// Initializes a new instance of MachineLearningWorkspaceGetKeysResult. + internal MachineLearningWorkspaceGetKeysResult() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceGetKeysResult. + /// Serialized Name: ListWorkspaceKeysResult.userStorageKey. + /// Serialized Name: ListWorkspaceKeysResult.userStorageResourceId. + /// Serialized Name: ListWorkspaceKeysResult.appInsightsInstrumentationKey. + /// Serialized Name: ListWorkspaceKeysResult.containerRegistryCredentials. + /// Serialized Name: ListWorkspaceKeysResult.notebookAccessKeys. + internal MachineLearningWorkspaceGetKeysResult(string userStorageKey, string userStorageResourceId, string appInsightsInstrumentationKey, MachineLearningContainerRegistryCredentials containerRegistryCredentials, MachineLearningWorkspaceGetNotebookKeysResult notebookAccessKeys) + { + UserStorageKey = userStorageKey; + UserStorageResourceId = userStorageResourceId; + AppInsightsInstrumentationKey = appInsightsInstrumentationKey; + ContainerRegistryCredentials = containerRegistryCredentials; + NotebookAccessKeys = notebookAccessKeys; + } + + /// Serialized Name: ListWorkspaceKeysResult.userStorageKey. + public string UserStorageKey { get; } + /// Serialized Name: ListWorkspaceKeysResult.userStorageResourceId. + public string UserStorageResourceId { get; } + /// Serialized Name: ListWorkspaceKeysResult.appInsightsInstrumentationKey. + public string AppInsightsInstrumentationKey { get; } + /// Serialized Name: ListWorkspaceKeysResult.containerRegistryCredentials. + public MachineLearningContainerRegistryCredentials ContainerRegistryCredentials { get; } + /// Serialized Name: ListWorkspaceKeysResult.notebookAccessKeys. + public MachineLearningWorkspaceGetNotebookKeysResult NotebookAccessKeys { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.Serialization.cs new file mode 100644 index 000000000000..79364397130d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.Serialization.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceGetNotebookKeysResult + { + internal static MachineLearningWorkspaceGetNotebookKeysResult DeserializeMachineLearningWorkspaceGetNotebookKeysResult(JsonElement element) + { + Optional primaryAccessKey = default; + Optional secondaryAccessKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("primaryAccessKey")) + { + primaryAccessKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secondaryAccessKey")) + { + secondaryAccessKey = property.Value.GetString(); + continue; + } + } + return new MachineLearningWorkspaceGetNotebookKeysResult(primaryAccessKey.Value, secondaryAccessKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs new file mode 100644 index 000000000000..71df08397c70 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetNotebookKeysResult.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceGetNotebookKeysResult. + /// Serialized Name: ListNotebookKeysResult + /// + public partial class MachineLearningWorkspaceGetNotebookKeysResult + { + /// Initializes a new instance of MachineLearningWorkspaceGetNotebookKeysResult. + internal MachineLearningWorkspaceGetNotebookKeysResult() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceGetNotebookKeysResult. + /// Serialized Name: ListNotebookKeysResult.primaryAccessKey. + /// Serialized Name: ListNotebookKeysResult.secondaryAccessKey. + internal MachineLearningWorkspaceGetNotebookKeysResult(string primaryAccessKey, string secondaryAccessKey) + { + PrimaryAccessKey = primaryAccessKey; + SecondaryAccessKey = secondaryAccessKey; + } + + /// Serialized Name: ListNotebookKeysResult.primaryAccessKey. + public string PrimaryAccessKey { get; } + /// Serialized Name: ListNotebookKeysResult.secondaryAccessKey. + public string SecondaryAccessKey { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.Serialization.cs new file mode 100644 index 000000000000..e89c9174085f --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.Serialization.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceGetStorageAccountKeysResult + { + internal static MachineLearningWorkspaceGetStorageAccountKeysResult DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(JsonElement element) + { + Optional userStorageKey = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userStorageKey")) + { + userStorageKey = property.Value.GetString(); + continue; + } + } + return new MachineLearningWorkspaceGetStorageAccountKeysResult(userStorageKey.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs new file mode 100644 index 000000000000..36803823dc91 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceGetStorageAccountKeysResult.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceGetStorageAccountKeysResult. + /// Serialized Name: ListStorageAccountKeysResult + /// + public partial class MachineLearningWorkspaceGetStorageAccountKeysResult + { + /// Initializes a new instance of MachineLearningWorkspaceGetStorageAccountKeysResult. + internal MachineLearningWorkspaceGetStorageAccountKeysResult() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceGetStorageAccountKeysResult. + /// Serialized Name: ListStorageAccountKeysResult.userStorageKey. + internal MachineLearningWorkspaceGetStorageAccountKeysResult(string userStorageKey) + { + UserStorageKey = userStorageKey; + } + + /// Serialized Name: ListStorageAccountKeysResult.userStorageKey. + 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 new file mode 100644 index 000000000000..449c4904959e --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceNotebookAccessTokenResult + { + internal static MachineLearningWorkspaceNotebookAccessTokenResult DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(JsonElement element) + { + Optional notebookResourceId = default; + Optional hostName = default; + Optional publicDns = default; + Optional accessToken = default; + Optional tokenType = default; + Optional expiresIn = default; + Optional refreshToken = default; + Optional scope = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("notebookResourceId")) + { + notebookResourceId = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostName")) + { + hostName = property.Value.GetString(); + continue; + } + if (property.NameEquals("publicDns")) + { + publicDns = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessToken")) + { + accessToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("tokenType")) + { + tokenType = property.Value.GetString(); + continue; + } + if (property.NameEquals("expiresIn")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + expiresIn = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("refreshToken")) + { + refreshToken = property.Value.GetString(); + continue; + } + if (property.NameEquals("scope")) + { + scope = property.Value.GetString(); + continue; + } + } + return new MachineLearningWorkspaceNotebookAccessTokenResult(notebookResourceId.Value, hostName.Value, publicDns.Value, accessToken.Value, tokenType.Value, Optional.ToNullable(expiresIn), refreshToken.Value, scope.Value); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs new file mode 100644 index 000000000000..3506a0176a15 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceNotebookAccessTokenResult.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The MachineLearningWorkspaceNotebookAccessTokenResult. + /// Serialized Name: NotebookAccessTokenResult + /// + public partial class MachineLearningWorkspaceNotebookAccessTokenResult + { + /// Initializes a new instance of MachineLearningWorkspaceNotebookAccessTokenResult. + internal MachineLearningWorkspaceNotebookAccessTokenResult() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceNotebookAccessTokenResult. + /// Serialized Name: NotebookAccessTokenResult.notebookResourceId. + /// Serialized Name: NotebookAccessTokenResult.hostName. + /// Serialized Name: NotebookAccessTokenResult.publicDns. + /// Serialized Name: NotebookAccessTokenResult.accessToken. + /// Serialized Name: NotebookAccessTokenResult.tokenType. + /// Serialized Name: NotebookAccessTokenResult.expiresIn. + /// Serialized Name: NotebookAccessTokenResult.refreshToken. + /// Serialized Name: NotebookAccessTokenResult.scope. + internal MachineLearningWorkspaceNotebookAccessTokenResult(string notebookResourceId, string hostName, string publicDns, string accessToken, string tokenType, int? expiresIn, string refreshToken, string scope) + { + NotebookResourceId = notebookResourceId; + HostName = hostName; + PublicDns = publicDns; + AccessToken = accessToken; + TokenType = tokenType; + ExpiresIn = expiresIn; + RefreshToken = refreshToken; + Scope = scope; + } + + /// Serialized Name: NotebookAccessTokenResult.notebookResourceId. + public string NotebookResourceId { get; } + /// Serialized Name: NotebookAccessTokenResult.hostName. + public string HostName { get; } + /// Serialized Name: NotebookAccessTokenResult.publicDns. + public string PublicDns { get; } + /// Serialized Name: NotebookAccessTokenResult.accessToken. + public string AccessToken { get; } + /// Serialized Name: NotebookAccessTokenResult.tokenType. + public string TokenType { get; } + /// Serialized Name: NotebookAccessTokenResult.expiresIn. + public int? ExpiresIn { get; } + /// Serialized Name: NotebookAccessTokenResult.refreshToken. + public string RefreshToken { get; } + /// Serialized Name: NotebookAccessTokenResult.scope. + public string Scope { get; } + } +} 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 f0a117f4c4ba..db81df32dbfd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspacePatch.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The parameters for updating a machine learning workspace. + /// + /// The parameters for updating a machine learning workspace. + /// Serialized Name: WorkspaceUpdateParameters + /// public partial class MachineLearningWorkspacePatch { /// Initializes a new instance of MachineLearningWorkspacePatch. @@ -20,21 +23,45 @@ public MachineLearningWorkspacePatch() Tags = new ChangeTrackingDictionary(); } - /// The resource tags for the machine learning workspace. + /// + /// The resource tags for the machine learning workspace. + /// Serialized Name: WorkspaceUpdateParameters.tags + /// public IDictionary Tags { get; } - /// The sku of the workspace. + /// + /// The sku of the workspace. + /// Serialized Name: WorkspaceUpdateParameters.sku + /// public MachineLearningSku Sku { get; set; } - /// The identity of the resource. + /// + /// The identity of the resource. + /// Serialized Name: WorkspaceUpdateParameters.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// The description of this workspace. + /// + /// The description of this workspace. + /// Serialized Name: WorkspaceUpdateParameters.properties.description + /// public string Description { get; set; } - /// The friendly name for this workspace. + /// + /// The friendly name for this workspace. + /// Serialized Name: WorkspaceUpdateParameters.properties.friendlyName + /// public string FriendlyName { get; set; } - /// The compute name for image build. + /// + /// The compute name for image build + /// Serialized Name: WorkspaceUpdateParameters.properties.imageBuildCompute + /// public string ImageBuildCompute { get; set; } - /// The service managed resource settings. + /// + /// The service managed resource settings. + /// Serialized Name: WorkspaceUpdateParameters.properties.serviceManagedResourcesSettings + /// internal ServiceManagedResourcesSettings ServiceManagedResourcesSettings { get; set; } - /// The throughput of the collections in cosmosdb database. + /// + /// The throughput of the collections in cosmosdb database + /// Serialized Name: CosmosDbSettings.collectionsThroughput + /// public int? CosmosDbCollectionsThroughput { get => ServiceManagedResourcesSettings is null ? default : ServiceManagedResourcesSettings.CosmosDbCollectionsThroughput; @@ -46,13 +73,25 @@ public int? CosmosDbCollectionsThroughput } } - /// The user assigned identity resource id that represents the workspace identity. + /// + /// The user assigned identity resource id that represents the workspace identity. + /// Serialized Name: WorkspaceUpdateParameters.properties.primaryUserAssignedIdentity + /// public string PrimaryUserAssignedIdentity { get; set; } - /// Whether requests from Public Network are allowed. - public PublicNetworkAccess? PublicNetworkAccess { get; set; } - /// ARM id of the application insights associated with this workspace. + /// + /// Whether requests from Public Network are allowed. + /// Serialized Name: WorkspaceUpdateParameters.properties.publicNetworkAccess + /// + public MachineLearningPublicNetworkAccess? PublicNetworkAccess { get; set; } + /// + /// ARM id of the application insights associated with this workspace. + /// Serialized Name: WorkspaceUpdateParameters.properties.applicationInsights + /// public string ApplicationInsights { get; set; } - /// ARM id of the container registry associated with this workspace. + /// + /// ARM id of the container registry associated with this workspace. + /// Serialized Name: WorkspaceUpdateParameters.properties.containerRegistry + /// public string ContainerRegistry { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaStatus.cs new file mode 100644 index 000000000000..fe1200a95842 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaStatus.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// Status of update workspace quota. + /// Serialized Name: Status + /// + public readonly partial struct MachineLearningWorkspaceQuotaStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MachineLearningWorkspaceQuotaStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UndefinedValue = "Undefined"; + private const string SuccessValue = "Success"; + private const string FailureValue = "Failure"; + private const string InvalidQuotaBelowClusterMinimumValue = "InvalidQuotaBelowClusterMinimum"; + private const string InvalidQuotaExceedsSubscriptionLimitValue = "InvalidQuotaExceedsSubscriptionLimit"; + private const string InvalidVmFamilyNameValue = "InvalidVMFamilyName"; + private const string OperationNotSupportedForSkuValue = "OperationNotSupportedForSku"; + private const string OperationNotEnabledForRegionValue = "OperationNotEnabledForRegion"; + + /// + /// Undefined + /// Serialized Name: Status.Undefined + /// + public static MachineLearningWorkspaceQuotaStatus Undefined { get; } = new MachineLearningWorkspaceQuotaStatus(UndefinedValue); + /// + /// Success + /// Serialized Name: Status.Success + /// + public static MachineLearningWorkspaceQuotaStatus Success { get; } = new MachineLearningWorkspaceQuotaStatus(SuccessValue); + /// + /// Failure + /// Serialized Name: Status.Failure + /// + public static MachineLearningWorkspaceQuotaStatus Failure { get; } = new MachineLearningWorkspaceQuotaStatus(FailureValue); + /// + /// InvalidQuotaBelowClusterMinimum + /// Serialized Name: Status.InvalidQuotaBelowClusterMinimum + /// + public static MachineLearningWorkspaceQuotaStatus InvalidQuotaBelowClusterMinimum { get; } = new MachineLearningWorkspaceQuotaStatus(InvalidQuotaBelowClusterMinimumValue); + /// + /// InvalidQuotaExceedsSubscriptionLimit + /// Serialized Name: Status.InvalidQuotaExceedsSubscriptionLimit + /// + public static MachineLearningWorkspaceQuotaStatus InvalidQuotaExceedsSubscriptionLimit { get; } = new MachineLearningWorkspaceQuotaStatus(InvalidQuotaExceedsSubscriptionLimitValue); + /// + /// InvalidVMFamilyName + /// Serialized Name: Status.InvalidVMFamilyName + /// + public static MachineLearningWorkspaceQuotaStatus InvalidVmFamilyName { get; } = new MachineLearningWorkspaceQuotaStatus(InvalidVmFamilyNameValue); + /// + /// OperationNotSupportedForSku + /// Serialized Name: Status.OperationNotSupportedForSku + /// + public static MachineLearningWorkspaceQuotaStatus OperationNotSupportedForSku { get; } = new MachineLearningWorkspaceQuotaStatus(OperationNotSupportedForSkuValue); + /// + /// OperationNotEnabledForRegion + /// Serialized Name: Status.OperationNotEnabledForRegion + /// + public static MachineLearningWorkspaceQuotaStatus OperationNotEnabledForRegion { get; } = new MachineLearningWorkspaceQuotaStatus(OperationNotEnabledForRegionValue); + /// Determines if two values are the same. + public static bool operator ==(MachineLearningWorkspaceQuotaStatus left, MachineLearningWorkspaceQuotaStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MachineLearningWorkspaceQuotaStatus left, MachineLearningWorkspaceQuotaStatus right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator MachineLearningWorkspaceQuotaStatus(string value) => new MachineLearningWorkspaceQuotaStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MachineLearningWorkspaceQuotaStatus other && Equals(other); + /// + public bool Equals(MachineLearningWorkspaceQuotaStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaUpdate.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaUpdate.Serialization.cs new file mode 100644 index 000000000000..db95cdb9d5d3 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaUpdate.Serialization.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MachineLearningWorkspaceQuotaUpdate + { + internal static MachineLearningWorkspaceQuotaUpdate DeserializeMachineLearningWorkspaceQuotaUpdate(JsonElement element) + { + Optional id = default; + Optional type = default; + Optional limit = default; + Optional unit = default; + Optional status = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id")) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type")) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("limit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + limit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("unit")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + unit = new MachineLearningQuotaUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("status")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + status = new MachineLearningWorkspaceQuotaStatus(property.Value.GetString()); + continue; + } + } + return new MachineLearningWorkspaceQuotaUpdate(id.Value, type.Value, Optional.ToNullable(limit), Optional.ToNullable(unit), Optional.ToNullable(status)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaUpdate.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaUpdate.cs new file mode 100644 index 000000000000..d072128fae8c --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MachineLearningWorkspaceQuotaUpdate.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// The properties for update Quota response. + /// Serialized Name: UpdateWorkspaceQuotas + /// + public partial class MachineLearningWorkspaceQuotaUpdate + { + /// Initializes a new instance of MachineLearningWorkspaceQuotaUpdate. + internal MachineLearningWorkspaceQuotaUpdate() + { + } + + /// Initializes a new instance of MachineLearningWorkspaceQuotaUpdate. + /// + /// Specifies the resource ID. + /// Serialized Name: UpdateWorkspaceQuotas.id + /// + /// + /// Specifies the resource type. + /// Serialized Name: UpdateWorkspaceQuotas.type + /// + /// + /// The maximum permitted quota of the resource. + /// Serialized Name: UpdateWorkspaceQuotas.limit + /// + /// + /// An enum describing the unit of quota measurement. + /// Serialized Name: UpdateWorkspaceQuotas.unit + /// + /// + /// Status of update workspace quota. + /// Serialized Name: UpdateWorkspaceQuotas.status + /// + internal MachineLearningWorkspaceQuotaUpdate(string id, string updateWorkspaceQuotasType, long? limit, MachineLearningQuotaUnit? unit, MachineLearningWorkspaceQuotaStatus? status) + { + Id = id; + UpdateWorkspaceQuotasType = updateWorkspaceQuotasType; + Limit = limit; + Unit = unit; + Status = status; + } + + /// + /// Specifies the resource ID. + /// Serialized Name: UpdateWorkspaceQuotas.id + /// + public string Id { get; } + /// + /// Specifies the resource type. + /// Serialized Name: UpdateWorkspaceQuotas.type + /// + public string UpdateWorkspaceQuotasType { get; } + /// + /// The maximum permitted quota of the resource. + /// Serialized Name: UpdateWorkspaceQuotas.limit + /// + public long? Limit { get; } + /// + /// An enum describing the unit of quota measurement. + /// Serialized Name: UpdateWorkspaceQuotas.unit + /// + public MachineLearningQuotaUnit? Unit { get; } + /// + /// Status of update workspace quota. + /// Serialized Name: UpdateWorkspaceQuotas.status + /// + public MachineLearningWorkspaceQuotaStatus? Status { get; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentity.Serialization.cs deleted file mode 100644 index 9906645b44dd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentity.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ManagedIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ClientId)) - { - if (ClientId != null) - { - writer.WritePropertyName("clientId"); - writer.WriteStringValue(ClientId.Value); - } - else - { - writer.WriteNull("clientId"); - } - } - if (Optional.IsDefined(ObjectId)) - { - if (ObjectId != null) - { - writer.WritePropertyName("objectId"); - writer.WriteStringValue(ObjectId.Value); - } - else - { - writer.WriteNull("objectId"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - writer.WritePropertyName("identityType"); - writer.WriteStringValue(IdentityType.ToString()); - writer.WriteEndObject(); - } - - internal static ManagedIdentity DeserializeManagedIdentity(JsonElement element) - { - Optional clientId = default; - Optional objectId = default; - Optional resourceId = default; - IdentityConfigurationType identityType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clientId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - clientId = null; - continue; - } - clientId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("objectId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - objectId = null; - continue; - } - objectId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("identityType")) - { - identityType = new IdentityConfigurationType(property.Value.GetString()); - continue; - } - } - return new ManagedIdentity(identityType, Optional.ToNullable(clientId), Optional.ToNullable(objectId), resourceId.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentity.cs deleted file mode 100644 index 79d9c2329f6e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentity.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Managed identity configuration. - public partial class ManagedIdentity : IdentityConfiguration - { - /// Initializes a new instance of ManagedIdentity. - public ManagedIdentity() - { - IdentityType = IdentityConfigurationType.Managed; - } - - /// Initializes a new instance of ManagedIdentity. - /// [Required] Specifies the type of identity framework. - /// Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. - /// Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. - /// Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. - internal ManagedIdentity(IdentityConfigurationType identityType, Guid? clientId, Guid? objectId, string resourceId) : base(identityType) - { - ClientId = clientId; - ObjectId = objectId; - ResourceId = resourceId; - IdentityType = identityType; - } - - /// Specifies a user-assigned identity by client ID. For system-assigned, do not set this field. - public Guid? ClientId { get; set; } - /// Specifies a user-assigned identity by object ID. For system-assigned, do not set this field. - public Guid? ObjectId { get; set; } - /// Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field. - public string ResourceId { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.Serialization.cs deleted file mode 100644 index d1afb6730ca1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ManagedIdentityAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Credentials)) - { - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - } - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType.ToString()); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category.Value.ToString()); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - if (Optional.IsDefined(ValueFormat)) - { - writer.WritePropertyName("valueFormat"); - writer.WriteStringValue(ValueFormat.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static ManagedIdentityAuthTypeWorkspaceConnectionProperties DeserializeManagedIdentityAuthTypeWorkspaceConnectionProperties(JsonElement element) - { - Optional credentials = default; - ConnectionAuthType authType = default; - Optional category = default; - Optional target = default; - Optional value = default; - Optional valueFormat = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - credentials = WorkspaceConnectionManagedIdentity.DeserializeWorkspaceConnectionManagedIdentity(property.Value); - continue; - } - if (property.NameEquals("authType")) - { - authType = new ConnectionAuthType(property.Value.GetString()); - continue; - } - if (property.NameEquals("category")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - category = new ConnectionCategory(property.Value.GetString()); - continue; - } - if (property.NameEquals("target")) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueFormat")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - valueFormat = new ValueFormat(property.Value.GetString()); - continue; - } - } - return new ManagedIdentityAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.cs deleted file mode 100644 index 327959496842..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ManagedIdentityAuthTypeWorkspaceConnectionProperties. - public partial class ManagedIdentityAuthTypeWorkspaceConnectionProperties : WorkspaceConnectionPropertiesV2 - { - /// Initializes a new instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties. - public ManagedIdentityAuthTypeWorkspaceConnectionProperties() - { - AuthType = ConnectionAuthType.ManagedIdentity; - } - - /// Initializes a new instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - /// - internal ManagedIdentityAuthTypeWorkspaceConnectionProperties(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat, WorkspaceConnectionManagedIdentity credentials) : base(authType, category, target, value, valueFormat) - { - Credentials = credentials; - AuthType = authType; - } - - /// Gets or sets the credentials. - public WorkspaceConnectionManagedIdentity Credentials { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineDeployment.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineDeployment.Serialization.cs deleted file mode 100644 index b1033abba049..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineDeployment.Serialization.cs +++ /dev/null @@ -1,393 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ManagedOnlineDeployment : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(EgressPublicNetworkAccess)) - { - writer.WritePropertyName("egressPublicNetworkAccess"); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); - } - writer.WritePropertyName("endpointComputeType"); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) - { - if (InstanceType != null) - { - writer.WritePropertyName("instanceType"); - writer.WriteStringValue(InstanceType); - } - else - { - writer.WriteNull("instanceType"); - } - } - if (Optional.IsDefined(LivenessProbe)) - { - if (LivenessProbe != null) - { - writer.WritePropertyName("livenessProbe"); - writer.WriteObjectValue(LivenessProbe); - } - else - { - writer.WriteNull("livenessProbe"); - } - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"); - writer.WriteStringValue(Model); - } - else - { - writer.WriteNull("model"); - } - } - if (Optional.IsDefined(ModelMountPath)) - { - if (ModelMountPath != null) - { - writer.WritePropertyName("modelMountPath"); - writer.WriteStringValue(ModelMountPath); - } - else - { - writer.WriteNull("modelMountPath"); - } - } - if (Optional.IsDefined(ReadinessProbe)) - { - if (ReadinessProbe != null) - { - writer.WritePropertyName("readinessProbe"); - writer.WriteObjectValue(ReadinessProbe); - } - else - { - writer.WriteNull("readinessProbe"); - } - } - if (Optional.IsDefined(RequestSettings)) - { - if (RequestSettings != null) - { - writer.WritePropertyName("requestSettings"); - writer.WriteObjectValue(RequestSettings); - } - else - { - writer.WriteNull("requestSettings"); - } - } - if (Optional.IsDefined(ScaleSettings)) - { - if (ScaleSettings != null) - { - writer.WritePropertyName("scaleSettings"); - writer.WriteObjectValue(ScaleSettings); - } - else - { - writer.WriteNull("scaleSettings"); - } - } - if (Optional.IsDefined(CodeConfiguration)) - { - if (CodeConfiguration != null) - { - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - } - else - { - writer.WriteNull("codeConfiguration"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(EnvironmentId)) - { - if (EnvironmentId != null) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - else - { - writer.WriteNull("environmentId"); - } - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - if (EnvironmentVariables != null) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("environmentVariables"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static ManagedOnlineDeployment DeserializeManagedOnlineDeployment(JsonElement element) - { - Optional appInsightsEnabled = default; - Optional egressPublicNetworkAccess = default; - EndpointComputeType endpointComputeType = default; - Optional instanceType = default; - Optional livenessProbe = default; - Optional model = default; - Optional modelMountPath = default; - Optional provisioningState = default; - Optional readinessProbe = default; - Optional requestSettings = default; - Optional scaleSettings = default; - Optional codeConfiguration = default; - Optional description = default; - Optional environmentId = default; - Optional> environmentVariables = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("appInsightsEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("egressPublicNetworkAccess")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - egressPublicNetworkAccess = new EgressPublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointComputeType")) - { - endpointComputeType = new EndpointComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("instanceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instanceType = null; - continue; - } - instanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("livenessProbe")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - livenessProbe = null; - continue; - } - livenessProbe = ProbeSettings.DeserializeProbeSettings(property.Value); - continue; - } - if (property.NameEquals("model")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelMountPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelMountPath = null; - continue; - } - modelMountPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new DeploymentProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("readinessProbe")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - readinessProbe = null; - continue; - } - readinessProbe = ProbeSettings.DeserializeProbeSettings(property.Value); - continue; - } - if (property.NameEquals("requestSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - requestSettings = null; - continue; - } - requestSettings = OnlineRequestSettings.DeserializeOnlineRequestSettings(property.Value); - continue; - } - if (property.NameEquals("scaleSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - scaleSettings = null; - continue; - } - scaleSettings = OnlineScaleSettings.DeserializeOnlineScaleSettings(property.Value); - continue; - } - if (property.NameEquals("codeConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeConfiguration = null; - continue; - } - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentId = null; - continue; - } - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentVariables = 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, property0.Value.GetString()); - } - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - } - return new ManagedOnlineDeployment(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineDeployment.cs deleted file mode 100644 index 2fa28a989536..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedOnlineDeployment.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Properties specific to a ManagedOnlineDeployment. - public partial class ManagedOnlineDeployment : OnlineDeploymentProperties - { - /// Initializes a new instance of ManagedOnlineDeployment. - public ManagedOnlineDeployment() - { - EndpointComputeType = EndpointComputeType.Managed; - } - - /// Initializes a new instance of ManagedOnlineDeployment. - /// 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. - /// 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 . - /// - internal ManagedOnlineDeployment(CodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, EgressPublicNetworkAccessType? egressPublicNetworkAccess, EndpointComputeType endpointComputeType, string instanceType, ProbeSettings livenessProbe, string model, string modelMountPath, DeploymentProvisioningState? provisioningState, ProbeSettings readinessProbe, OnlineRequestSettings requestSettings, OnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties, appInsightsEnabled, egressPublicNetworkAccess, endpointComputeType, instanceType, livenessProbe, model, modelMountPath, provisioningState, readinessProbe, requestSettings, scaleSettings) - { - EndpointComputeType = endpointComputeType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedServiceIdentityType.cs deleted file mode 100644 index 36844cee49ed..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ManagedServiceIdentityType.cs +++ /dev/null @@ -1,57 +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 managed service identity (where both SystemAssigned and UserAssigned types are allowed). - public readonly partial struct ManagedServiceIdentityType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ManagedServiceIdentityType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string SystemAssignedValue = "SystemAssigned"; - private const string UserAssignedValue = "UserAssigned"; - private const string SystemAssignedUserAssignedValue = "SystemAssigned,UserAssigned"; - - /// None. - public static ManagedServiceIdentityType None { get; } = new ManagedServiceIdentityType(NoneValue); - /// SystemAssigned. - public static ManagedServiceIdentityType SystemAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedValue); - /// UserAssigned. - public static ManagedServiceIdentityType UserAssigned { get; } = new ManagedServiceIdentityType(UserAssignedValue); - /// SystemAssigned,UserAssigned. - public static ManagedServiceIdentityType SystemAssignedUserAssigned { get; } = new ManagedServiceIdentityType(SystemAssignedUserAssignedValue); - /// Determines if two values are the same. - public static bool operator ==(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ManagedServiceIdentityType left, ManagedServiceIdentityType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ManagedServiceIdentityType(string value) => new ManagedServiceIdentityType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ManagedServiceIdentityType other && Equals(other); - /// - public bool Equals(ManagedServiceIdentityType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} 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 5641570aa910..8e91714e6957 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MedianStoppingPolicy.cs @@ -7,8 +7,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Defines an early termination policy based on running averages of the primary metric of all runs. - public partial class MedianStoppingPolicy : EarlyTerminationPolicy + /// + /// Defines an early termination policy based on running averages of the primary metric of all runs + /// Serialized Name: MedianStoppingPolicy + /// + public partial class MedianStoppingPolicy : MachineLearningEarlyTerminationPolicy { /// Initializes a new instance of MedianStoppingPolicy. public MedianStoppingPolicy() @@ -17,9 +20,18 @@ public MedianStoppingPolicy() } /// Initializes a new instance of MedianStoppingPolicy. - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. - /// [Required] Name of policy configuration. + /// + /// Number of intervals by which to delay the first evaluation. + /// Serialized Name: EarlyTerminationPolicy.delayEvaluation + /// + /// + /// Interval (number of runs) between policy evaluations. + /// Serialized Name: EarlyTerminationPolicy.evaluationInterval + /// + /// + /// [Required] Name of policy configuration + /// Serialized Name: EarlyTerminationPolicy.policyType + /// internal MedianStoppingPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType) : base(delayEvaluation, evaluationInterval, policyType) { PolicyType = policyType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerData.Serialization.cs deleted file mode 100644 index 4e0022759ffb..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class ModelContainerData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ModelContainerData DeserializeModelContainerData(JsonElement element) - { - ModelContainerProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = ModelContainerProperties.DeserializeModelContainerProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new ModelContainerData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerProperties.Serialization.cs deleted file mode 100644 index 50f7e942ffef..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerProperties.Serialization.cs +++ /dev/null @@ -1,173 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ModelContainerProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static ModelContainerProperties DeserializeModelContainerProperties(JsonElement element) - { - Optional isArchived = default; - Optional latestVersion = default; - Optional nextVersion = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("latestVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - latestVersion = null; - continue; - } - latestVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nextVersion")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nextVersion = null; - continue; - } - nextVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new ModelContainerProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isArchived), latestVersion.Value, nextVersion.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerProperties.cs deleted file mode 100644 index f1aa732bc7e6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerProperties.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ModelContainerProperties. - public partial class ModelContainerProperties : AssetContainer - { - /// Initializes a new instance of ModelContainerProperties. - public ModelContainerProperties() - { - } - - /// Initializes a new instance of ModelContainerProperties. - /// 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. - internal ModelContainerProperties(string description, IDictionary properties, IDictionary tags, bool? isArchived, string latestVersion, string nextVersion) : base(description, properties, tags, isArchived, latestVersion, nextVersion) - { - } - } -} 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 1cb7e08d6d63..e986c3b52d5e 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 @@ -17,7 +17,7 @@ internal partial class ModelContainerResourceArmPaginatedResult internal static ModelContainerResourceArmPaginatedResult DeserializeModelContainerResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static ModelContainerResourceArmPaginatedResult DeserializeModelContain property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ModelContainerData.DeserializeModelContainerData(item)); + array.Add(MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(item)); } value = array; continue; 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 8aedff063fbd..81b7c0328b6a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelContainerResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of ModelContainer entities. + /// + /// A paginated list of ModelContainer entities. + /// Serialized Name: ModelContainerResourceArmPaginatedResult + /// internal partial class ModelContainerResourceArmPaginatedResult { /// Initializes a new instance of ModelContainerResourceArmPaginatedResult. internal ModelContainerResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ModelContainerResourceArmPaginatedResult. - /// The link to the next page of ModelContainer objects. If null, there are no additional pages. - /// An array of objects of type ModelContainer. - internal ModelContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of ModelContainer objects. If null, there are no additional pages. + /// Serialized Name: ModelContainerResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type ModelContainer. + /// Serialized Name: ModelContainerResourceArmPaginatedResult.value + /// + internal ModelContainerResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of ModelContainer objects. If null, there are no additional pages. + /// + /// The link to the next page of ModelContainer objects. If null, there are no additional pages. + /// Serialized Name: ModelContainerResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type ModelContainer. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type ModelContainer. + /// Serialized Name: ModelContainerResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelSize.cs deleted file mode 100644 index 075b1b2e1128..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelSize.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 -{ - /// Image model size. - public readonly partial struct ModelSize : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ModelSize(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string SmallValue = "Small"; - private const string MediumValue = "Medium"; - private const string LargeValue = "Large"; - private const string ExtraLargeValue = "ExtraLarge"; - - /// No value selected. - public static ModelSize None { get; } = new ModelSize(NoneValue); - /// Small size. - public static ModelSize Small { get; } = new ModelSize(SmallValue); - /// Medium size. - public static ModelSize Medium { get; } = new ModelSize(MediumValue); - /// Large size. - public static ModelSize Large { get; } = new ModelSize(LargeValue); - /// Extra large size. - public static ModelSize ExtraLarge { get; } = new ModelSize(ExtraLargeValue); - /// Determines if two values are the same. - public static bool operator ==(ModelSize left, ModelSize right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ModelSize left, ModelSize right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ModelSize(string value) => new ModelSize(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ModelSize other && Equals(other); - /// - public bool Equals(ModelSize other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionData.Serialization.cs deleted file mode 100644 index 4ed57930346a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class ModelVersionData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ModelVersionData DeserializeModelVersionData(JsonElement element) - { - ModelVersionProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = ModelVersionProperties.DeserializeModelVersionProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new ModelVersionData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionProperties.Serialization.cs deleted file mode 100644 index fcd684c045d7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionProperties.Serialization.cs +++ /dev/null @@ -1,278 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ModelVersionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Flavors)) - { - if (Flavors != null) - { - writer.WritePropertyName("flavors"); - writer.WriteStartObject(); - foreach (var item in Flavors) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("flavors"); - } - } - if (Optional.IsDefined(JobName)) - { - if (JobName != null) - { - writer.WritePropertyName("jobName"); - writer.WriteStringValue(JobName); - } - else - { - writer.WriteNull("jobName"); - } - } - if (Optional.IsDefined(ModelType)) - { - if (ModelType != null) - { - writer.WritePropertyName("modelType"); - writer.WriteStringValue(ModelType); - } - else - { - writer.WriteNull("modelType"); - } - } - if (Optional.IsDefined(ModelUri)) - { - if (ModelUri != null) - { - writer.WritePropertyName("modelUri"); - writer.WriteStringValue(ModelUri.AbsoluteUri); - } - else - { - writer.WriteNull("modelUri"); - } - } - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static ModelVersionProperties DeserializeModelVersionProperties(JsonElement element) - { - Optional> flavors = default; - Optional jobName = default; - Optional modelType = default; - Optional modelUri = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("flavors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - flavors = 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, FlavorData.DeserializeFlavorData(property0.Value)); - } - } - flavors = dictionary; - continue; - } - if (property.NameEquals("jobName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - jobName = null; - continue; - } - jobName = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelType = null; - continue; - } - modelType = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelUri = null; - continue; - } - modelUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new ModelVersionProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), Optional.ToDictionary(flavors), jobName.Value, modelType.Value, modelUri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionProperties.cs deleted file mode 100644 index cc83dad3b6f3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionProperties.cs +++ /dev/null @@ -1,50 +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 -{ - /// Model asset version details. - public partial class ModelVersionProperties : AssetBase - { - /// Initializes a new instance of ModelVersionProperties. - public ModelVersionProperties() - { - Flavors = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ModelVersionProperties. - /// 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?. - /// 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. - internal ModelVersionProperties(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, IDictionary flavors, string jobName, string modelType, Uri modelUri) : base(description, properties, tags, isAnonymous, isArchived) - { - Flavors = flavors; - JobName = jobName; - ModelType = modelType; - ModelUri = modelUri; - } - - /// 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; } - } -} 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 46f3024463f2..0199b36a31b5 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 @@ -17,7 +17,7 @@ internal partial class ModelVersionResourceArmPaginatedResult internal static ModelVersionResourceArmPaginatedResult DeserializeModelVersionResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static ModelVersionResourceArmPaginatedResult DeserializeModelVersionRe property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ModelVersionData.DeserializeModelVersionData(item)); + array.Add(MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(item)); } value = array; continue; 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 47c967108c7a..f9143ce843cd 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ModelVersionResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of ModelVersion entities. + /// + /// A paginated list of ModelVersion entities. + /// Serialized Name: ModelVersionResourceArmPaginatedResult + /// internal partial class ModelVersionResourceArmPaginatedResult { /// Initializes a new instance of ModelVersionResourceArmPaginatedResult. internal ModelVersionResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ModelVersionResourceArmPaginatedResult. - /// The link to the next page of ModelVersion objects. If null, there are no additional pages. - /// An array of objects of type ModelVersion. - internal ModelVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of ModelVersion objects. If null, there are no additional pages. + /// Serialized Name: ModelVersionResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type ModelVersion. + /// Serialized Name: ModelVersionResourceArmPaginatedResult.value + /// + internal ModelVersionResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of ModelVersion objects. If null, there are no additional pages. + /// + /// The link to the next page of ModelVersion objects. If null, there are no additional pages. + /// Serialized Name: ModelVersionResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type ModelVersion. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type ModelVersion. + /// Serialized Name: ModelVersionResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountAction.cs deleted file mode 100644 index 8cc1ba6b3e87..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountAction.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 Action. - public readonly partial struct MountAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MountAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MountValue = "Mount"; - private const string UnmountValue = "Unmount"; - - /// Mount. - public static MountAction Mount { get; } = new MountAction(MountValue); - /// Unmount. - public static MountAction Unmount { get; } = new MountAction(UnmountValue); - /// Determines if two values are the same. - public static bool operator ==(MountAction left, MountAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MountAction left, MountAction right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MountAction(string value) => new MountAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MountAction other && Equals(other); - /// - public bool Equals(MountAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountState.cs deleted file mode 100644 index 9d05ddcdc1b2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MountState.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 -{ - /// Mount state. - public readonly partial struct MountState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MountState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MountRequestedValue = "MountRequested"; - private const string MountedValue = "Mounted"; - private const string MountFailedValue = "MountFailed"; - private const string UnmountRequestedValue = "UnmountRequested"; - private const string UnmountFailedValue = "UnmountFailed"; - private const string UnmountedValue = "Unmounted"; - - /// MountRequested. - public static MountState MountRequested { get; } = new MountState(MountRequestedValue); - /// Mounted. - public static MountState Mounted { get; } = new MountState(MountedValue); - /// MountFailed. - public static MountState MountFailed { get; } = new MountState(MountFailedValue); - /// UnmountRequested. - public static MountState UnmountRequested { get; } = new MountState(UnmountRequestedValue); - /// UnmountFailed. - public static MountState UnmountFailed { get; } = new MountState(UnmountFailedValue); - /// Unmounted. - public static MountState Unmounted { get; } = new MountState(UnmountedValue); - /// Determines if two values are the same. - public static bool operator ==(MountState left, MountState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MountState left, MountState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MountState(string value) => new MountState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MountState other && Equals(other); - /// - public bool Equals(MountState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Mpi.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Mpi.Serialization.cs deleted file mode 100644 index ae8e2a2d6cd6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Mpi.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Mpi : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ProcessCountPerInstance)) - { - if (ProcessCountPerInstance != null) - { - writer.WritePropertyName("processCountPerInstance"); - writer.WriteNumberValue(ProcessCountPerInstance.Value); - } - else - { - writer.WriteNull("processCountPerInstance"); - } - } - writer.WritePropertyName("distributionType"); - writer.WriteStringValue(DistributionType.ToString()); - writer.WriteEndObject(); - } - - internal static Mpi DeserializeMpi(JsonElement element) - { - Optional processCountPerInstance = default; - DistributionType distributionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("processCountPerInstance")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - processCountPerInstance = null; - continue; - } - processCountPerInstance = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("distributionType")) - { - distributionType = new DistributionType(property.Value.GetString()); - continue; - } - } - return new Mpi(distributionType, Optional.ToNullable(processCountPerInstance)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Mpi.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Mpi.cs deleted file mode 100644 index 22736d041042..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Mpi.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// MPI distribution configuration. - public partial class Mpi : DistributionConfiguration - { - /// Initializes a new instance of Mpi. - public Mpi() - { - DistributionType = DistributionType.Mpi; - } - - /// Initializes a new instance of Mpi. - /// [Required] Specifies the type of distribution framework. - /// Number of processes per MPI node. - internal Mpi(DistributionType distributionType, int? processCountPerInstance) : base(distributionType) - { - ProcessCountPerInstance = processCountPerInstance; - DistributionType = distributionType; - } - - /// Number of processes per MPI node. - public int? ProcessCountPerInstance { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MpiDistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MpiDistributionConfiguration.Serialization.cs new file mode 100644 index 000000000000..a428888ca20b --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MpiDistributionConfiguration.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class MpiDistributionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ProcessCountPerInstance)) + { + if (ProcessCountPerInstance != null) + { + writer.WritePropertyName("processCountPerInstance"); + writer.WriteNumberValue(ProcessCountPerInstance.Value); + } + else + { + writer.WriteNull("processCountPerInstance"); + } + } + writer.WritePropertyName("distributionType"); + writer.WriteStringValue(DistributionType.ToString()); + writer.WriteEndObject(); + } + + internal static MpiDistributionConfiguration DeserializeMpiDistributionConfiguration(JsonElement element) + { + Optional processCountPerInstance = default; + DistributionType distributionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("processCountPerInstance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + processCountPerInstance = null; + continue; + } + processCountPerInstance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("distributionType")) + { + distributionType = new DistributionType(property.Value.GetString()); + continue; + } + } + return new MpiDistributionConfiguration(distributionType, Optional.ToNullable(processCountPerInstance)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MpiDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MpiDistributionConfiguration.cs new file mode 100644 index 000000000000..66b83a3ae21d --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/MpiDistributionConfiguration.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// MPI distribution configuration. + /// Serialized Name: Mpi + /// + public partial class MpiDistributionConfiguration : MachineLearningDistributionConfiguration + { + /// Initializes a new instance of MpiDistributionConfiguration. + public MpiDistributionConfiguration() + { + DistributionType = DistributionType.Mpi; + } + + /// Initializes a new instance of MpiDistributionConfiguration. + /// + /// [Required] Specifies the type of distribution framework. + /// Serialized Name: DistributionConfiguration.distributionType + /// + /// + /// Number of processes per MPI node. + /// Serialized Name: Mpi.processCountPerInstance + /// + internal MpiDistributionConfiguration(DistributionType distributionType, int? processCountPerInstance) : base(distributionType) + { + ProcessCountPerInstance = processCountPerInstance; + DistributionType = distributionType; + } + + /// + /// Number of processes per MPI node. + /// Serialized Name: Mpi.processCountPerInstance + /// + public int? ProcessCountPerInstance { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidations.cs index 3f047ddfe0ea..53c358b61b2b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidations.cs @@ -9,6 +9,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// /// N-Cross validations value. + /// Serialized Name: NCrossValidations /// Please note is the base class. According to the scenario, a derived class 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 . /// @@ -20,13 +21,19 @@ protected NCrossValidations() } /// Initializes a new instance of NCrossValidations. - /// [Required] Mode for determining N-Cross validations. + /// + /// [Required] Mode for determining N-Cross validations. + /// Serialized Name: NCrossValidations.mode + /// internal NCrossValidations(NCrossValidationsMode mode) { Mode = mode; } - /// [Required] Mode for determining N-Cross validations. + /// + /// [Required] Mode for determining N-Cross validations. + /// Serialized Name: NCrossValidations.mode + /// internal NCrossValidationsMode Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidationsMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidationsMode.cs index d120036e0d9e..15c5f4bc35c0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidationsMode.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NCrossValidationsMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Determines how N-Cross validations value is determined. + /// + /// Determines how N-Cross validations value is determined. + /// Serialized Name: NCrossValidationsMode + /// internal readonly partial struct NCrossValidationsMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public NCrossValidationsMode(string value) private const string AutoValue = "Auto"; private const string CustomValue = "Custom"; - /// Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task. + /// + /// Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task. + /// Serialized Name: NCrossValidationsMode.Auto + /// public static NCrossValidationsMode Auto { get; } = new NCrossValidationsMode(AutoValue); - /// Use custom N-Cross validations value. + /// + /// Use custom N-Cross validations value. + /// Serialized Name: NCrossValidationsMode.Custom + /// public static NCrossValidationsMode Custom { get; } = new NCrossValidationsMode(CustomValue); /// Determines if two values are the same. public static bool operator ==(NCrossValidationsMode left, NCrossValidationsMode right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Network.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Network.cs deleted file mode 100644 index 9314dea9ce40..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Network.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 -{ - /// network of this container. - public readonly partial struct Network : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Network(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string BridgeValue = "Bridge"; - private const string HostValue = "Host"; - - /// Bridge. - public static Network Bridge { get; } = new Network(BridgeValue); - /// Host. - public static Network Host { get; } = new Network(HostValue); - /// Determines if two values are the same. - public static bool operator ==(Network left, Network right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Network left, Network right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Network(string value) => new Network(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Network other && Equals(other); - /// - public bool Equals(Network other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalFeaturizationSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalFeaturizationSettings.cs index 0f36ecd9f7d5..3aaa37e046b8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalFeaturizationSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalFeaturizationSettings.cs @@ -7,8 +7,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The NlpVerticalFeaturizationSettings. - internal partial class NlpVerticalFeaturizationSettings : FeaturizationSettings + /// + /// The NlpVerticalFeaturizationSettings. + /// Serialized Name: NlpVerticalFeaturizationSettings + /// + internal partial class NlpVerticalFeaturizationSettings : MachineLearningFeaturizationSettings { /// Initializes a new instance of NlpVerticalFeaturizationSettings. public NlpVerticalFeaturizationSettings() @@ -16,7 +19,10 @@ public NlpVerticalFeaturizationSettings() } /// Initializes a new instance of NlpVerticalFeaturizationSettings. - /// Dataset language, useful for the text data. + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// internal NlpVerticalFeaturizationSettings(string datasetLanguage) : base(datasetLanguage) { } 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 b0c81c484d73..94bcdaf324f7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NlpVerticalLimitSettings.cs @@ -9,7 +9,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Job execution constraints. + /// + /// Job execution constraints. + /// Serialized Name: NlpVerticalLimitSettings + /// public partial class NlpVerticalLimitSettings { /// Initializes a new instance of NlpVerticalLimitSettings. @@ -18,9 +21,18 @@ public NlpVerticalLimitSettings() } /// Initializes a new instance of NlpVerticalLimitSettings. - /// Maximum Concurrent AutoML iterations. - /// Number of AutoML iterations. - /// AutoML job timeout. + /// + /// Maximum Concurrent AutoML iterations. + /// Serialized Name: NlpVerticalLimitSettings.maxConcurrentTrials + /// + /// + /// Number of AutoML iterations. + /// Serialized Name: NlpVerticalLimitSettings.maxTrials + /// + /// + /// AutoML job timeout. + /// Serialized Name: NlpVerticalLimitSettings.timeout + /// internal NlpVerticalLimitSettings(int? maxConcurrentTrials, int? maxTrials, TimeSpan? timeout) { MaxConcurrentTrials = maxConcurrentTrials; @@ -28,11 +40,20 @@ internal NlpVerticalLimitSettings(int? maxConcurrentTrials, int? maxTrials, Time Timeout = timeout; } - /// Maximum Concurrent AutoML iterations. + /// + /// Maximum Concurrent AutoML iterations. + /// Serialized Name: NlpVerticalLimitSettings.maxConcurrentTrials + /// public int? MaxConcurrentTrials { get; set; } - /// Number of AutoML iterations. + /// + /// Number of AutoML iterations. + /// Serialized Name: NlpVerticalLimitSettings.maxTrials + /// public int? MaxTrials { get; set; } - /// AutoML job timeout. + /// + /// AutoML job timeout. + /// Serialized Name: NlpVerticalLimitSettings.timeout + /// public TimeSpan? Timeout { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeState.cs deleted file mode 100644 index 531db4b072bf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeState.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 -{ - /// State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. - public readonly partial struct NodeState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public NodeState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string IdleValue = "idle"; - private const string RunningValue = "running"; - private const string PreparingValue = "preparing"; - private const string UnusableValue = "unusable"; - private const string LeavingValue = "leaving"; - private const string PreemptedValue = "preempted"; - - /// idle. - public static NodeState Idle { get; } = new NodeState(IdleValue); - /// running. - public static NodeState Running { get; } = new NodeState(RunningValue); - /// preparing. - public static NodeState Preparing { get; } = new NodeState(PreparingValue); - /// unusable. - public static NodeState Unusable { get; } = new NodeState(UnusableValue); - /// leaving. - public static NodeState Leaving { get; } = new NodeState(LeavingValue); - /// preempted. - public static NodeState Preempted { get; } = new NodeState(PreemptedValue); - /// Determines if two values are the same. - public static bool operator ==(NodeState left, NodeState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(NodeState left, NodeState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator NodeState(string value) => new NodeState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is NodeState other && Equals(other); - /// - public bool Equals(NodeState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeStateCounts.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeStateCounts.Serialization.cs deleted file mode 100644 index 34d90cf210ed..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeStateCounts.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class NodeStateCounts - { - internal static NodeStateCounts DeserializeNodeStateCounts(JsonElement element) - { - Optional idleNodeCount = default; - Optional runningNodeCount = default; - Optional preparingNodeCount = default; - Optional unusableNodeCount = default; - Optional leavingNodeCount = default; - Optional preemptedNodeCount = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("idleNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - idleNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("runningNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - runningNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("preparingNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - preparingNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("unusableNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - unusableNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("leavingNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - leavingNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("preemptedNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - preemptedNodeCount = property.Value.GetInt32(); - continue; - } - } - return new NodeStateCounts(Optional.ToNullable(idleNodeCount), Optional.ToNullable(runningNodeCount), Optional.ToNullable(preparingNodeCount), Optional.ToNullable(unusableNodeCount), Optional.ToNullable(leavingNodeCount), Optional.ToNullable(preemptedNodeCount)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeStateCounts.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeStateCounts.cs deleted file mode 100644 index 5748e859afee..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NodeStateCounts.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Counts of various compute node states on the amlCompute. - public partial class NodeStateCounts - { - /// Initializes a new instance of NodeStateCounts. - internal NodeStateCounts() - { - } - - /// Initializes a new instance of NodeStateCounts. - /// Number of compute nodes in idle state. - /// Number of compute nodes which are running jobs. - /// Number of compute nodes which are being prepared. - /// Number of compute nodes which are in unusable state. - /// Number of compute nodes which are leaving the amlCompute. - /// Number of compute nodes which are in preempted state. - internal NodeStateCounts(int? idleNodeCount, int? runningNodeCount, int? preparingNodeCount, int? unusableNodeCount, int? leavingNodeCount, int? preemptedNodeCount) - { - IdleNodeCount = idleNodeCount; - RunningNodeCount = runningNodeCount; - PreparingNodeCount = preparingNodeCount; - UnusableNodeCount = unusableNodeCount; - LeavingNodeCount = leavingNodeCount; - PreemptedNodeCount = preemptedNodeCount; - } - - /// Number of compute nodes in idle state. - public int? IdleNodeCount { get; } - /// Number of compute nodes which are running jobs. - public int? RunningNodeCount { get; } - /// Number of compute nodes which are being prepared. - public int? PreparingNodeCount { get; } - /// Number of compute nodes which are in unusable state. - public int? UnusableNodeCount { get; } - /// Number of compute nodes which are leaving the amlCompute. - public int? LeavingNodeCount { get; } - /// Number of compute nodes which are in preempted state. - public int? PreemptedNodeCount { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneAuthTypeWorkspaceConnectionProperties.Serialization.cs deleted file mode 100644 index 30a43d20cf9b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class NoneAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType.ToString()); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category.Value.ToString()); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - if (Optional.IsDefined(ValueFormat)) - { - writer.WritePropertyName("valueFormat"); - writer.WriteStringValue(ValueFormat.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static NoneAuthTypeWorkspaceConnectionProperties DeserializeNoneAuthTypeWorkspaceConnectionProperties(JsonElement element) - { - ConnectionAuthType authType = default; - Optional category = default; - Optional target = default; - Optional value = default; - Optional valueFormat = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authType")) - { - authType = new ConnectionAuthType(property.Value.GetString()); - continue; - } - if (property.NameEquals("category")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - category = new ConnectionCategory(property.Value.GetString()); - continue; - } - if (property.NameEquals("target")) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueFormat")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - valueFormat = new ValueFormat(property.Value.GetString()); - continue; - } - } - return new NoneAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneAuthTypeWorkspaceConnectionProperties.cs deleted file mode 100644 index c849e97db38b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneAuthTypeWorkspaceConnectionProperties.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The NoneAuthTypeWorkspaceConnectionProperties. - public partial class NoneAuthTypeWorkspaceConnectionProperties : WorkspaceConnectionPropertiesV2 - { - /// Initializes a new instance of NoneAuthTypeWorkspaceConnectionProperties. - public NoneAuthTypeWorkspaceConnectionProperties() - { - AuthType = ConnectionAuthType.None; - } - - /// Initializes a new instance of NoneAuthTypeWorkspaceConnectionProperties. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - internal NoneAuthTypeWorkspaceConnectionProperties(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat) : base(authType, category, target, value, valueFormat) - { - AuthType = authType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneDatastoreCredentials.Serialization.cs deleted file mode 100644 index 9b05139b17f5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneDatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class NoneDatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("credentialsType"); - writer.WriteStringValue(CredentialsType.ToString()); - writer.WriteEndObject(); - } - - internal static NoneDatastoreCredentials DeserializeNoneDatastoreCredentials(JsonElement element) - { - CredentialsType credentialsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentialsType")) - { - credentialsType = new CredentialsType(property.Value.GetString()); - continue; - } - } - return new NoneDatastoreCredentials(credentialsType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneDatastoreCredentials.cs deleted file mode 100644 index c289c639a896..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NoneDatastoreCredentials.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Empty/none datastore credentials. - public partial class NoneDatastoreCredentials : DatastoreCredentials - { - /// Initializes a new instance of NoneDatastoreCredentials. - public NoneDatastoreCredentials() - { - CredentialsType = CredentialsType.None; - } - - /// Initializes a new instance of NoneDatastoreCredentials. - /// [Required] Credential type used to authentication with storage. - internal NoneDatastoreCredentials(CredentialsType credentialsType) : base(credentialsType) - { - CredentialsType = credentialsType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookAccessTokenResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookAccessTokenResult.Serialization.cs deleted file mode 100644 index 8282e67282b7..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookAccessTokenResult.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class NotebookAccessTokenResult - { - internal static NotebookAccessTokenResult DeserializeNotebookAccessTokenResult(JsonElement element) - { - Optional notebookResourceId = default; - Optional hostName = default; - Optional publicDns = default; - Optional accessToken = default; - Optional tokenType = default; - Optional expiresIn = default; - Optional refreshToken = default; - Optional scope = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("notebookResourceId")) - { - notebookResourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("hostName")) - { - hostName = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicDns")) - { - publicDns = property.Value.GetString(); - continue; - } - if (property.NameEquals("accessToken")) - { - accessToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("tokenType")) - { - tokenType = property.Value.GetString(); - continue; - } - if (property.NameEquals("expiresIn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - expiresIn = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("refreshToken")) - { - refreshToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("scope")) - { - scope = property.Value.GetString(); - continue; - } - } - return new NotebookAccessTokenResult(notebookResourceId.Value, hostName.Value, publicDns.Value, accessToken.Value, tokenType.Value, Optional.ToNullable(expiresIn), refreshToken.Value, scope.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookAccessTokenResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookAccessTokenResult.cs deleted file mode 100644 index 44afad8e76d2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookAccessTokenResult.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The NotebookAccessTokenResult. - public partial class NotebookAccessTokenResult - { - /// Initializes a new instance of NotebookAccessTokenResult. - internal NotebookAccessTokenResult() - { - } - - /// Initializes a new instance of NotebookAccessTokenResult. - /// - /// - /// - /// - /// - /// - /// - /// - internal NotebookAccessTokenResult(string notebookResourceId, string hostName, string publicDns, string accessToken, string tokenType, int? expiresIn, string refreshToken, string scope) - { - NotebookResourceId = notebookResourceId; - HostName = hostName; - PublicDns = publicDns; - AccessToken = accessToken; - TokenType = tokenType; - ExpiresIn = expiresIn; - RefreshToken = refreshToken; - Scope = scope; - } - - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookPreparationError.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookPreparationError.Serialization.cs deleted file mode 100644 index 3ffefee10f52..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookPreparationError.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class NotebookPreparationError - { - internal static NotebookPreparationError DeserializeNotebookPreparationError(JsonElement element) - { - Optional errorMessage = default; - Optional statusCode = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("errorMessage")) - { - errorMessage = property.Value.GetString(); - continue; - } - if (property.NameEquals("statusCode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - statusCode = property.Value.GetInt32(); - continue; - } - } - return new NotebookPreparationError(errorMessage.Value, Optional.ToNullable(statusCode)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookPreparationError.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookPreparationError.cs deleted file mode 100644 index a7b6b7089bf9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookPreparationError.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The NotebookPreparationError. - public partial class NotebookPreparationError - { - /// Initializes a new instance of NotebookPreparationError. - internal NotebookPreparationError() - { - } - - /// Initializes a new instance of NotebookPreparationError. - /// - /// - internal NotebookPreparationError(string errorMessage, int? statusCode) - { - ErrorMessage = errorMessage; - StatusCode = statusCode; - } - - /// Gets the error message. - public string ErrorMessage { get; } - /// Gets the status code. - public int? StatusCode { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookResourceInfo.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookResourceInfo.Serialization.cs deleted file mode 100644 index 3b47680632d8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookResourceInfo.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class NotebookResourceInfo - { - internal static NotebookResourceInfo DeserializeNotebookResourceInfo(JsonElement element) - { - Optional fqdn = default; - Optional resourceId = default; - Optional notebookPreparationError = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fqdn")) - { - fqdn = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceId")) - { - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("notebookPreparationError")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - notebookPreparationError = null; - continue; - } - notebookPreparationError = NotebookPreparationError.DeserializeNotebookPreparationError(property.Value); - continue; - } - } - return new NotebookResourceInfo(fqdn.Value, resourceId.Value, notebookPreparationError.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookResourceInfo.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookResourceInfo.cs deleted file mode 100644 index 20fccb570205..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/NotebookResourceInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The NotebookResourceInfo. - public partial class NotebookResourceInfo - { - /// Initializes a new instance of NotebookResourceInfo. - internal NotebookResourceInfo() - { - } - - /// Initializes a new instance of NotebookResourceInfo. - /// - /// the data plane resourceId that used to initialize notebook component. - /// The error that occurs when preparing notebook. - internal NotebookResourceInfo(string fqdn, string resourceId, NotebookPreparationError notebookPreparationError) - { - Fqdn = fqdn; - ResourceId = resourceId; - NotebookPreparationError = notebookPreparationError; - } - - /// Gets the fqdn. - public string Fqdn { get; } - /// the data plane resourceId that used to initialize notebook component. - public string ResourceId { get; } - /// The error that occurs when preparing notebook. - public NotebookPreparationError NotebookPreparationError { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSType.cs deleted file mode 100644 index d9f9668755ce..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OSType.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 -{ - /// Compute OS Type. - public readonly partial struct OSType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OSType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LinuxValue = "Linux"; - private const string WindowsValue = "Windows"; - - /// Linux. - public static OSType Linux { get; } = new OSType(LinuxValue); - /// Windows. - public static OSType Windows { get; } = new OSType(WindowsValue); - /// Determines if two values are the same. - public static bool operator ==(OSType left, OSType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OSType left, OSType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OSType(string value) => new OSType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OSType other && Equals(other); - /// - public bool Equals(OSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ObjectDetectionPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ObjectDetectionPrimaryMetric.cs index dc0f60edeb55..94c3cc4883ff 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ObjectDetectionPrimaryMetric.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ObjectDetectionPrimaryMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Primary metrics for Image ObjectDetection task. + /// + /// Primary metrics for Image ObjectDetection task. + /// Serialized Name: ObjectDetectionPrimaryMetrics + /// public readonly partial struct ObjectDetectionPrimaryMetric : IEquatable { private readonly string _value; @@ -27,6 +30,7 @@ public ObjectDetectionPrimaryMetric(string value) /// /// Mean Average Precision (MAP) is the average of AP (Average Precision). /// AP is calculated for each class and averaged to get the MAP. + /// Serialized Name: ObjectDetectionPrimaryMetrics.MeanAveragePrecision /// public static ObjectDetectionPrimaryMetric MeanAveragePrecision { get; } = new ObjectDetectionPrimaryMetric(MeanAveragePrecisionValue); /// Determines if two values are the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Objective.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Objective.Serialization.cs deleted file mode 100644 index 9fc9aa33dc19..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Objective.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Objective : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("goal"); - writer.WriteStringValue(Goal.ToString()); - writer.WritePropertyName("primaryMetric"); - writer.WriteStringValue(PrimaryMetric); - writer.WriteEndObject(); - } - - internal static Objective DeserializeObjective(JsonElement element) - { - Goal goal = default; - string primaryMetric = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("goal")) - { - goal = new Goal(property.Value.GetString()); - continue; - } - if (property.NameEquals("primaryMetric")) - { - primaryMetric = property.Value.GetString(); - continue; - } - } - return new Objective(goal, primaryMetric); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Objective.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Objective.cs deleted file mode 100644 index a94dd46e8690..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Objective.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Optimization objective. - public partial class Objective - { - /// Initializes a new instance of Objective. - /// [Required] Defines supported metric goals for hyperparameter tuning. - /// [Required] Name of the metric to optimize. - /// is null. - public Objective(Goal goal, string primaryMetric) - { - Argument.AssertNotNull(primaryMetric, nameof(primaryMetric)); - - Goal = goal; - PrimaryMetric = primaryMetric; - } - - /// [Required] Defines supported metric goals for hyperparameter tuning. - public Goal Goal { get; set; } - /// [Required] Name of the metric to optimize. - public string PrimaryMetric { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentData.Serialization.cs deleted file mode 100644 index 4f14ae39aae4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentData.Serialization.cs +++ /dev/null @@ -1,149 +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 Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class OnlineDeploymentData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - writer.WriteEndObject(); - } - - internal static OnlineDeploymentData DeserializeOnlineDeploymentData(JsonElement element) - { - Optional identity = default; - Optional kind = default; - OnlineDeploymentProperties properties = default; - Optional sku = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); - continue; - } - if (property.NameEquals("kind")) - { - kind = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = OnlineDeploymentProperties.DeserializeOnlineDeploymentProperties(property.Value); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location")) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new OnlineDeploymentData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentPatch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentPatch.Serialization.cs deleted file mode 100644 index 3d98be7ce98f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentPatch.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OnlineDeploymentPatch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentPatch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentPatch.cs deleted file mode 100644 index acde5448c543..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentPatch.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Strictly used in update requests. - public partial class OnlineDeploymentPatch : PartialMinimalTrackedResource - { - /// Initializes a new instance of OnlineDeploymentPatch. - public OnlineDeploymentPatch() - { - } - - /// Sku details required for ARM contract for Autoscaling. - public PartialSku Sku { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentProperties.Serialization.cs deleted file mode 100644 index 467af2103c06..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentProperties.Serialization.cs +++ /dev/null @@ -1,401 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OnlineDeploymentProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AppInsightsEnabled)) - { - writer.WritePropertyName("appInsightsEnabled"); - writer.WriteBooleanValue(AppInsightsEnabled.Value); - } - if (Optional.IsDefined(EgressPublicNetworkAccess)) - { - writer.WritePropertyName("egressPublicNetworkAccess"); - writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString()); - } - writer.WritePropertyName("endpointComputeType"); - writer.WriteStringValue(EndpointComputeType.ToString()); - if (Optional.IsDefined(InstanceType)) - { - if (InstanceType != null) - { - writer.WritePropertyName("instanceType"); - writer.WriteStringValue(InstanceType); - } - else - { - writer.WriteNull("instanceType"); - } - } - if (Optional.IsDefined(LivenessProbe)) - { - if (LivenessProbe != null) - { - writer.WritePropertyName("livenessProbe"); - writer.WriteObjectValue(LivenessProbe); - } - else - { - writer.WriteNull("livenessProbe"); - } - } - if (Optional.IsDefined(Model)) - { - if (Model != null) - { - writer.WritePropertyName("model"); - writer.WriteStringValue(Model); - } - else - { - writer.WriteNull("model"); - } - } - if (Optional.IsDefined(ModelMountPath)) - { - if (ModelMountPath != null) - { - writer.WritePropertyName("modelMountPath"); - writer.WriteStringValue(ModelMountPath); - } - else - { - writer.WriteNull("modelMountPath"); - } - } - if (Optional.IsDefined(ReadinessProbe)) - { - if (ReadinessProbe != null) - { - writer.WritePropertyName("readinessProbe"); - writer.WriteObjectValue(ReadinessProbe); - } - else - { - writer.WriteNull("readinessProbe"); - } - } - if (Optional.IsDefined(RequestSettings)) - { - if (RequestSettings != null) - { - writer.WritePropertyName("requestSettings"); - writer.WriteObjectValue(RequestSettings); - } - else - { - writer.WriteNull("requestSettings"); - } - } - if (Optional.IsDefined(ScaleSettings)) - { - if (ScaleSettings != null) - { - writer.WritePropertyName("scaleSettings"); - writer.WriteObjectValue(ScaleSettings); - } - else - { - writer.WriteNull("scaleSettings"); - } - } - if (Optional.IsDefined(CodeConfiguration)) - { - if (CodeConfiguration != null) - { - writer.WritePropertyName("codeConfiguration"); - writer.WriteObjectValue(CodeConfiguration); - } - else - { - writer.WriteNull("codeConfiguration"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(EnvironmentId)) - { - if (EnvironmentId != null) - { - writer.WritePropertyName("environmentId"); - writer.WriteStringValue(EnvironmentId); - } - else - { - writer.WriteNull("environmentId"); - } - } - if (Optional.IsCollectionDefined(EnvironmentVariables)) - { - if (EnvironmentVariables != null) - { - writer.WritePropertyName("environmentVariables"); - writer.WriteStartObject(); - foreach (var item in EnvironmentVariables) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("environmentVariables"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static OnlineDeploymentProperties DeserializeOnlineDeploymentProperties(JsonElement element) - { - if (element.TryGetProperty("endpointComputeType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Kubernetes": return KubernetesOnlineDeployment.DeserializeKubernetesOnlineDeployment(element); - case "Managed": return ManagedOnlineDeployment.DeserializeManagedOnlineDeployment(element); - } - } - Optional appInsightsEnabled = default; - Optional egressPublicNetworkAccess = default; - EndpointComputeType endpointComputeType = default; - Optional instanceType = default; - Optional livenessProbe = default; - Optional model = default; - Optional modelMountPath = default; - Optional provisioningState = default; - Optional readinessProbe = default; - Optional requestSettings = default; - Optional scaleSettings = default; - Optional codeConfiguration = default; - Optional description = default; - Optional environmentId = default; - Optional> environmentVariables = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("appInsightsEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - appInsightsEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("egressPublicNetworkAccess")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - egressPublicNetworkAccess = new EgressPublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("endpointComputeType")) - { - endpointComputeType = new EndpointComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("instanceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instanceType = null; - continue; - } - instanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("livenessProbe")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - livenessProbe = null; - continue; - } - livenessProbe = ProbeSettings.DeserializeProbeSettings(property.Value); - continue; - } - if (property.NameEquals("model")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelMountPath")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - modelMountPath = null; - continue; - } - modelMountPath = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new DeploymentProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("readinessProbe")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - readinessProbe = null; - continue; - } - readinessProbe = ProbeSettings.DeserializeProbeSettings(property.Value); - continue; - } - if (property.NameEquals("requestSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - requestSettings = null; - continue; - } - requestSettings = OnlineRequestSettings.DeserializeOnlineRequestSettings(property.Value); - continue; - } - if (property.NameEquals("scaleSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - scaleSettings = null; - continue; - } - scaleSettings = OnlineScaleSettings.DeserializeOnlineScaleSettings(property.Value); - continue; - } - if (property.NameEquals("codeConfiguration")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - codeConfiguration = null; - continue; - } - codeConfiguration = CodeConfiguration.DeserializeCodeConfiguration(property.Value); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentId = null; - continue; - } - environmentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("environmentVariables")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - environmentVariables = 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, property0.Value.GetString()); - } - } - environmentVariables = dictionary; - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - } - return new OnlineDeploymentProperties(codeConfiguration.Value, description.Value, environmentId.Value, Optional.ToDictionary(environmentVariables), Optional.ToDictionary(properties), Optional.ToNullable(appInsightsEnabled), Optional.ToNullable(egressPublicNetworkAccess), endpointComputeType, instanceType.Value, livenessProbe.Value, model.Value, modelMountPath.Value, Optional.ToNullable(provisioningState), readinessProbe.Value, requestSettings.Value, scaleSettings.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentProperties.cs deleted file mode 100644 index 610ba9f6da51..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentProperties.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// The OnlineDeploymentProperties. - /// Please note is the base class. According to the scenario, a derived class 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 partial class OnlineDeploymentProperties : EndpointDeploymentPropertiesBase - { - /// Initializes a new instance of OnlineDeploymentProperties. - public OnlineDeploymentProperties() - { - } - - /// Initializes a new instance of OnlineDeploymentProperties. - /// 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. - /// 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 . - /// - internal OnlineDeploymentProperties(CodeConfiguration codeConfiguration, string description, string environmentId, IDictionary environmentVariables, IDictionary properties, bool? appInsightsEnabled, EgressPublicNetworkAccessType? egressPublicNetworkAccess, EndpointComputeType endpointComputeType, string instanceType, ProbeSettings livenessProbe, string model, string modelMountPath, DeploymentProvisioningState? provisioningState, ProbeSettings readinessProbe, OnlineRequestSettings requestSettings, OnlineScaleSettings scaleSettings) : base(codeConfiguration, description, environmentId, environmentVariables, properties) - { - AppInsightsEnabled = appInsightsEnabled; - EgressPublicNetworkAccess = egressPublicNetworkAccess; - EndpointComputeType = endpointComputeType; - InstanceType = instanceType; - LivenessProbe = livenessProbe; - Model = model; - ModelMountPath = modelMountPath; - ProvisioningState = provisioningState; - ReadinessProbe = readinessProbe; - RequestSettings = requestSettings; - ScaleSettings = scaleSettings; - } - - /// If true, enables Application Insights logging. - public bool? AppInsightsEnabled { get; set; } - /// If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled. - public EgressPublicNetworkAccessType? EgressPublicNetworkAccess { get; set; } - /// [Required] The compute type of the endpoint. - internal EndpointComputeType EndpointComputeType { get; set; } - /// Compute instance type. - public string InstanceType { get; set; } - /// Liveness probe monitors the health of the container regularly. - public ProbeSettings 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 DeploymentProvisioningState? ProvisioningState { get; } - /// Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe. - public ProbeSettings ReadinessProbe { get; set; } - /// Request settings for the deployment. - public OnlineRequestSettings RequestSettings { get; set; } - /// - /// 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 . - /// - public OnlineScaleSettings ScaleSettings { 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 6c2722f80325..8eb86e322da8 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 @@ -17,7 +17,7 @@ internal partial class OnlineDeploymentTrackedResourceArmPaginatedResult internal static OnlineDeploymentTrackedResourceArmPaginatedResult DeserializeOnlineDeploymentTrackedResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static OnlineDeploymentTrackedResourceArmPaginatedResult DeserializeOnl property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(OnlineDeploymentData.DeserializeOnlineDeploymentData(item)); + array.Add(MachineLearningOnlineDeploymentData.DeserializeMachineLearningOnlineDeploymentData(item)); } value = array; continue; 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 e549cb596cb0..23cd40817a2d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineDeploymentTrackedResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of OnlineDeployment entities. + /// + /// A paginated list of OnlineDeployment entities. + /// Serialized Name: OnlineDeploymentTrackedResourceArmPaginatedResult + /// internal partial class OnlineDeploymentTrackedResourceArmPaginatedResult { /// Initializes a new instance of OnlineDeploymentTrackedResourceArmPaginatedResult. internal OnlineDeploymentTrackedResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of OnlineDeploymentTrackedResourceArmPaginatedResult. - /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. - /// An array of objects of type OnlineDeployment. - internal OnlineDeploymentTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + /// Serialized Name: OnlineDeploymentTrackedResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type OnlineDeployment. + /// Serialized Name: OnlineDeploymentTrackedResourceArmPaginatedResult.value + /// + internal OnlineDeploymentTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + /// + /// The link to the next page of OnlineDeployment objects. If null, there are no additional pages. + /// Serialized Name: OnlineDeploymentTrackedResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type OnlineDeployment. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type OnlineDeployment. + /// Serialized Name: OnlineDeploymentTrackedResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointData.Serialization.cs deleted file mode 100644 index a6d16c2bea76..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointData.Serialization.cs +++ /dev/null @@ -1,149 +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 Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class OnlineEndpointData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"); - writer.WriteStringValue(Kind); - } - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"); - writer.WriteObjectValue(Sku); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("location"); - writer.WriteStringValue(Location); - writer.WriteEndObject(); - } - - internal static OnlineEndpointData DeserializeOnlineEndpointData(JsonElement element) - { - Optional identity = default; - Optional kind = default; - OnlineEndpointProperties properties = default; - Optional sku = default; - Optional> tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; - identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); - continue; - } - if (property.NameEquals("kind")) - { - kind = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - properties = OnlineEndpointProperties.DeserializeOnlineEndpointProperties(property.Value); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sku = MachineLearningSku.DeserializeMachineLearningSku(property.Value); - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("location")) - { - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new OnlineEndpointData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, kind.Value, properties, sku.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointProperties.Serialization.cs deleted file mode 100644 index 01a4015d0b55..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointProperties.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OnlineEndpointProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Compute)) - { - if (Compute != null) - { - writer.WritePropertyName("compute"); - writer.WriteStringValue(Compute); - } - else - { - writer.WriteNull("compute"); - } - } - if (Optional.IsDefined(PublicNetworkAccess)) - { - writer.WritePropertyName("publicNetworkAccess"); - writer.WriteStringValue(PublicNetworkAccess.Value.ToString()); - } - if (Optional.IsCollectionDefined(Traffic)) - { - if (Traffic != null) - { - writer.WritePropertyName("traffic"); - writer.WriteStartObject(); - foreach (var item in Traffic) - { - writer.WritePropertyName(item.Key); - writer.WriteNumberValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("traffic"); - } - } - writer.WritePropertyName("authMode"); - writer.WriteStringValue(AuthMode.ToString()); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(Keys)) - { - if (Keys != null) - { - writer.WritePropertyName("keys"); - writer.WriteObjectValue(Keys); - } - else - { - writer.WriteNull("keys"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static OnlineEndpointProperties DeserializeOnlineEndpointProperties(JsonElement element) - { - Optional compute = default; - Optional provisioningState = default; - Optional publicNetworkAccess = default; - Optional> traffic = default; - EndpointAuthMode authMode = default; - Optional description = default; - Optional keys = default; - Optional> properties = default; - Optional scoringUri = default; - Optional swaggerUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("compute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - compute = null; - continue; - } - compute = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new EndpointProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("publicNetworkAccess")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - publicNetworkAccess = new PublicNetworkAccessType(property.Value.GetString()); - continue; - } - if (property.NameEquals("traffic")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - traffic = 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("authMode")) - { - authMode = new EndpointAuthMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("keys")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - keys = null; - continue; - } - keys = EndpointAuthKeys.DeserializeEndpointAuthKeys(property.Value); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("scoringUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - scoringUri = null; - continue; - } - scoringUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("swaggerUri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - swaggerUri = null; - continue; - } - swaggerUri = new Uri(property.Value.GetString()); - continue; - } - } - return new OnlineEndpointProperties(authMode, description.Value, keys.Value, Optional.ToDictionary(properties), scoringUri.Value, swaggerUri.Value, compute.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(publicNetworkAccess), Optional.ToDictionary(traffic)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointProperties.cs deleted file mode 100644 index 30ab7c080561..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointProperties.cs +++ /dev/null @@ -1,61 +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 -{ - /// Online endpoint configuration. - public partial class OnlineEndpointProperties : EndpointPropertiesBase - { - /// Initializes a new instance of OnlineEndpointProperties. - /// [Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does. - public OnlineEndpointProperties(EndpointAuthMode authMode) : base(authMode) - { - Traffic = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of OnlineEndpointProperties. - /// [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. - /// - /// ARM resource ID of the compute if it exists. - /// optional - /// - /// 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 OnlineEndpointProperties(EndpointAuthMode authMode, string description, EndpointAuthKeys keys, IDictionary properties, Uri scoringUri, Uri swaggerUri, string compute, EndpointProvisioningState? provisioningState, PublicNetworkAccessType? publicNetworkAccess, IDictionary traffic) : base(authMode, description, keys, properties, scoringUri, swaggerUri) - { - Compute = compute; - ProvisioningState = provisioningState; - PublicNetworkAccess = publicNetworkAccess; - Traffic = traffic; - } - - /// - /// ARM resource ID of the compute if it exists. - /// optional - /// - public string Compute { get; set; } - /// Provisioning state for the endpoint. - public EndpointProvisioningState? ProvisioningState { get; } - /// Set to "Enabled" for endpoints that should allow public access when Private Link is enabled. - public PublicNetworkAccessType? 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; } - } -} 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 062049a01dc1..0b8c2ffbb6b5 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 @@ -17,7 +17,7 @@ internal partial class OnlineEndpointTrackedResourceArmPaginatedResult internal static OnlineEndpointTrackedResourceArmPaginatedResult DeserializeOnlineEndpointTrackedResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static OnlineEndpointTrackedResourceArmPaginatedResult DeserializeOnlin property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(OnlineEndpointData.DeserializeOnlineEndpointData(item)); + array.Add(MachineLearningOnlineEndpointData.DeserializeMachineLearningOnlineEndpointData(item)); } value = array; continue; 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 4f64b3fbfdb7..75ae489cb4bc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineEndpointTrackedResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of OnlineEndpoint entities. + /// + /// A paginated list of OnlineEndpoint entities. + /// Serialized Name: OnlineEndpointTrackedResourceArmPaginatedResult + /// internal partial class OnlineEndpointTrackedResourceArmPaginatedResult { /// Initializes a new instance of OnlineEndpointTrackedResourceArmPaginatedResult. internal OnlineEndpointTrackedResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of OnlineEndpointTrackedResourceArmPaginatedResult. - /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. - /// An array of objects of type OnlineEndpoint. - internal OnlineEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + /// Serialized Name: OnlineEndpointTrackedResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type OnlineEndpoint. + /// Serialized Name: OnlineEndpointTrackedResourceArmPaginatedResult.value + /// + internal OnlineEndpointTrackedResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + /// + /// The link to the next page of OnlineEndpoint objects. If null, there are no additional pages. + /// Serialized Name: OnlineEndpointTrackedResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type OnlineEndpoint. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type OnlineEndpoint. + /// Serialized Name: OnlineEndpointTrackedResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineRequestSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineRequestSettings.Serialization.cs deleted file mode 100644 index 013d4db26a90..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineRequestSettings.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OnlineRequestSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxConcurrentRequestsPerInstance)) - { - writer.WritePropertyName("maxConcurrentRequestsPerInstance"); - writer.WriteNumberValue(MaxConcurrentRequestsPerInstance.Value); - } - if (Optional.IsDefined(MaxQueueWait)) - { - writer.WritePropertyName("maxQueueWait"); - writer.WriteStringValue(MaxQueueWait.Value, "P"); - } - if (Optional.IsDefined(RequestTimeout)) - { - writer.WritePropertyName("requestTimeout"); - writer.WriteStringValue(RequestTimeout.Value, "P"); - } - writer.WriteEndObject(); - } - - internal static OnlineRequestSettings DeserializeOnlineRequestSettings(JsonElement element) - { - Optional maxConcurrentRequestsPerInstance = default; - Optional maxQueueWait = default; - Optional requestTimeout = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxConcurrentRequestsPerInstance")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxConcurrentRequestsPerInstance = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxQueueWait")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxQueueWait = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("requestTimeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - requestTimeout = property.Value.GetTimeSpan("P"); - continue; - } - } - return new OnlineRequestSettings(Optional.ToNullable(maxConcurrentRequestsPerInstance), Optional.ToNullable(maxQueueWait), Optional.ToNullable(requestTimeout)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineRequestSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineRequestSettings.cs deleted file mode 100644 index ec23c4f02040..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineRequestSettings.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Online deployment scoring requests configuration. - public partial class OnlineRequestSettings - { - /// Initializes a new instance of OnlineRequestSettings. - public OnlineRequestSettings() - { - } - - /// Initializes a new instance of OnlineRequestSettings. - /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. - /// - /// The maximum amount of time a request will stay in the queue in ISO 8601 format. - /// Defaults to 500ms. - /// - /// - /// The scoring timeout in ISO 8601 format. - /// Defaults to 5000ms. - /// - internal OnlineRequestSettings(int? maxConcurrentRequestsPerInstance, TimeSpan? maxQueueWait, TimeSpan? requestTimeout) - { - MaxConcurrentRequestsPerInstance = maxConcurrentRequestsPerInstance; - MaxQueueWait = maxQueueWait; - RequestTimeout = requestTimeout; - } - - /// The number of maximum concurrent requests per node allowed per deployment. Defaults to 1. - public int? MaxConcurrentRequestsPerInstance { get; set; } - /// - /// The maximum amount of time a request will stay in the queue in ISO 8601 format. - /// Defaults to 500ms. - /// - public TimeSpan? MaxQueueWait { get; set; } - /// - /// The scoring timeout in ISO 8601 format. - /// Defaults to 5000ms. - /// - public TimeSpan? RequestTimeout { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineScaleSettings.Serialization.cs deleted file mode 100644 index ed941984070a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineScaleSettings.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OnlineScaleSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("scaleType"); - writer.WriteStringValue(ScaleType.ToString()); - writer.WriteEndObject(); - } - - internal static OnlineScaleSettings DeserializeOnlineScaleSettings(JsonElement element) - { - if (element.TryGetProperty("scaleType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Default": return DefaultScaleSettings.DeserializeDefaultScaleSettings(element); - case "TargetUtilization": return TargetUtilizationScaleSettings.DeserializeTargetUtilizationScaleSettings(element); - } - } - return UnknownOnlineScaleSettings.DeserializeUnknownOnlineScaleSettings(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineScaleSettings.cs deleted file mode 100644 index c549c18feef6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OnlineScaleSettings.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Online deployment scaling configuration. - /// Please note is the base class. According to the scenario, a derived class 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 OnlineScaleSettings - { - /// Initializes a new instance of OnlineScaleSettings. - protected OnlineScaleSettings() - { - } - - /// Initializes a new instance of OnlineScaleSettings. - /// [Required] Type of deployment scaling algorithm. - internal OnlineScaleSettings(ScaleType scaleType) - { - ScaleType = scaleType; - } - - /// [Required] Type of deployment scaling algorithm. - internal ScaleType ScaleType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperatingSystemType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperatingSystemType.cs deleted file mode 100644 index e7ba00c9f04a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperatingSystemType.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 type of operating system. - public readonly partial struct OperatingSystemType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OperatingSystemType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LinuxValue = "Linux"; - private const string WindowsValue = "Windows"; - - /// Linux. - public static OperatingSystemType Linux { get; } = new OperatingSystemType(LinuxValue); - /// Windows. - public static OperatingSystemType Windows { get; } = new OperatingSystemType(WindowsValue); - /// Determines if two values are the same. - public static bool operator ==(OperatingSystemType left, OperatingSystemType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OperatingSystemType left, OperatingSystemType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OperatingSystemType(string value) => new OperatingSystemType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OperatingSystemType other && Equals(other); - /// - public bool Equals(OperatingSystemType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationName.cs deleted file mode 100644 index 43108dec4f16..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationName.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 -{ - /// Name of the last operation. - public readonly partial struct OperationName : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OperationName(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreateValue = "Create"; - private const string StartValue = "Start"; - private const string StopValue = "Stop"; - private const string RestartValue = "Restart"; - private const string ReimageValue = "Reimage"; - private const string DeleteValue = "Delete"; - - /// Create. - public static OperationName Create { get; } = new OperationName(CreateValue); - /// Start. - public static OperationName Start { get; } = new OperationName(StartValue); - /// Stop. - public static OperationName Stop { get; } = new OperationName(StopValue); - /// Restart. - public static OperationName Restart { get; } = new OperationName(RestartValue); - /// Reimage. - public static OperationName Reimage { get; } = new OperationName(ReimageValue); - /// Delete. - public static OperationName Delete { get; } = new OperationName(DeleteValue); - /// Determines if two values are the same. - public static bool operator ==(OperationName left, OperationName right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OperationName left, OperationName right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OperationName(string value) => new OperationName(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OperationName other && Equals(other); - /// - public bool Equals(OperationName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationStatus.cs deleted file mode 100644 index 9005d492cfc4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationStatus.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.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Operation status. - public readonly partial struct OperationStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OperationStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "InProgress"; - private const string SucceededValue = "Succeeded"; - private const string CreateFailedValue = "CreateFailed"; - private const string StartFailedValue = "StartFailed"; - private const string StopFailedValue = "StopFailed"; - private const string RestartFailedValue = "RestartFailed"; - private const string ReimageFailedValue = "ReimageFailed"; - private const string DeleteFailedValue = "DeleteFailed"; - - /// InProgress. - public static OperationStatus InProgress { get; } = new OperationStatus(InProgressValue); - /// Succeeded. - public static OperationStatus Succeeded { get; } = new OperationStatus(SucceededValue); - /// CreateFailed. - public static OperationStatus CreateFailed { get; } = new OperationStatus(CreateFailedValue); - /// StartFailed. - public static OperationStatus StartFailed { get; } = new OperationStatus(StartFailedValue); - /// StopFailed. - public static OperationStatus StopFailed { get; } = new OperationStatus(StopFailedValue); - /// RestartFailed. - public static OperationStatus RestartFailed { get; } = new OperationStatus(RestartFailedValue); - /// ReimageFailed. - public static OperationStatus ReimageFailed { get; } = new OperationStatus(ReimageFailedValue); - /// DeleteFailed. - public static OperationStatus DeleteFailed { get; } = new OperationStatus(DeleteFailedValue); - /// Determines if two values are the same. - public static bool operator ==(OperationStatus left, OperationStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OperationStatus left, OperationStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OperationStatus(string value) => new OperationStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OperationStatus other && Equals(other); - /// - public bool Equals(OperationStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationTrigger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationTrigger.cs deleted file mode 100644 index f9c0c640ab52..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OperationTrigger.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 -{ - /// Trigger of operation. - public readonly partial struct OperationTrigger : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OperationTrigger(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UserValue = "User"; - private const string ScheduleValue = "Schedule"; - private const string IdleShutdownValue = "IdleShutdown"; - - /// User. - public static OperationTrigger User { get; } = new OperationTrigger(UserValue); - /// Schedule. - public static OperationTrigger Schedule { get; } = new OperationTrigger(ScheduleValue); - /// IdleShutdown. - public static OperationTrigger IdleShutdown { get; } = new OperationTrigger(IdleShutdownValue); - /// Determines if two values are the same. - public static bool operator ==(OperationTrigger left, OperationTrigger right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OperationTrigger left, OperationTrigger right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OperationTrigger(string value) => new OperationTrigger(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OperationTrigger other && Equals(other); - /// - public bool Equals(OperationTrigger other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OrderString.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OrderString.cs deleted file mode 100644 index 1c7c2e28e6e4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OrderString.cs +++ /dev/null @@ -1,57 +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 OrderString. - public readonly partial struct OrderString : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OrderString(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatedAtDescValue = "CreatedAtDesc"; - private const string CreatedAtAscValue = "CreatedAtAsc"; - private const string UpdatedAtDescValue = "UpdatedAtDesc"; - private const string UpdatedAtAscValue = "UpdatedAtAsc"; - - /// CreatedAtDesc. - public static OrderString CreatedAtDesc { get; } = new OrderString(CreatedAtDescValue); - /// CreatedAtAsc. - public static OrderString CreatedAtAsc { get; } = new OrderString(CreatedAtAscValue); - /// UpdatedAtDesc. - public static OrderString UpdatedAtDesc { get; } = new OrderString(UpdatedAtDescValue); - /// UpdatedAtAsc. - public static OrderString UpdatedAtAsc { get; } = new OrderString(UpdatedAtAscValue); - /// Determines if two values are the same. - public static bool operator ==(OrderString left, OrderString right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OrderString left, OrderString right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OrderString(string value) => new OrderString(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OrderString other && Equals(other); - /// - public bool Equals(OrderString other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputDeliveryMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputDeliveryMode.cs deleted file mode 100644 index 1c685728d58c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputDeliveryMode.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 -{ - /// Output data delivery mode enums. - public readonly partial struct OutputDeliveryMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OutputDeliveryMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ReadWriteMountValue = "ReadWriteMount"; - private const string UploadValue = "Upload"; - - /// ReadWriteMount. - public static OutputDeliveryMode ReadWriteMount { get; } = new OutputDeliveryMode(ReadWriteMountValue); - /// Upload. - public static OutputDeliveryMode Upload { get; } = new OutputDeliveryMode(UploadValue); - /// Determines if two values are the same. - public static bool operator ==(OutputDeliveryMode left, OutputDeliveryMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OutputDeliveryMode left, OutputDeliveryMode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator OutputDeliveryMode(string value) => new OutputDeliveryMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OutputDeliveryMode other && Equals(other); - /// - public bool Equals(OutputDeliveryMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputPathAssetReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputPathAssetReference.Serialization.cs deleted file mode 100644 index b23695188fdd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputPathAssetReference.Serialization.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class OutputPathAssetReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(JobId)) - { - if (JobId != null) - { - writer.WritePropertyName("jobId"); - writer.WriteStringValue(JobId); - } - else - { - writer.WriteNull("jobId"); - } - } - if (Optional.IsDefined(Path)) - { - if (Path != null) - { - writer.WritePropertyName("path"); - writer.WriteStringValue(Path); - } - else - { - writer.WriteNull("path"); - } - } - writer.WritePropertyName("referenceType"); - writer.WriteStringValue(ReferenceType.ToString()); - writer.WriteEndObject(); - } - - internal static OutputPathAssetReference DeserializeOutputPathAssetReference(JsonElement element) - { - Optional jobId = default; - Optional path = default; - ReferenceType referenceType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("jobId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - jobId = null; - continue; - } - jobId = property.Value.GetString(); - continue; - } - if (property.NameEquals("path")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - path = null; - continue; - } - path = property.Value.GetString(); - continue; - } - if (property.NameEquals("referenceType")) - { - referenceType = new ReferenceType(property.Value.GetString()); - continue; - } - } - return new OutputPathAssetReference(referenceType, jobId.Value, path.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputPathAssetReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputPathAssetReference.cs deleted file mode 100644 index 29fd3a9c1f72..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/OutputPathAssetReference.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Reference to an asset via its path in a job output. - public partial class OutputPathAssetReference : AssetReferenceBase - { - /// Initializes a new instance of OutputPathAssetReference. - public OutputPathAssetReference() - { - ReferenceType = ReferenceType.OutputPath; - } - - /// Initializes a new instance of OutputPathAssetReference. - /// [Required] Specifies the type of asset reference. - /// ARM resource ID of the job. - /// The path of the file/directory in the job output. - internal OutputPathAssetReference(ReferenceType referenceType, string jobId, string path) : base(referenceType) - { - JobId = jobId; - Path = path; - ReferenceType = referenceType; - } - - /// ARM resource ID of the job. - public string JobId { get; set; } - /// The path of the file/directory in the job output. - public string Path { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PATAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PATAuthTypeWorkspaceConnectionProperties.Serialization.cs deleted file mode 100644 index f0e82e034016..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PATAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PATAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Credentials)) - { - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - } - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType.ToString()); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category.Value.ToString()); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - if (Optional.IsDefined(ValueFormat)) - { - writer.WritePropertyName("valueFormat"); - writer.WriteStringValue(ValueFormat.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static PATAuthTypeWorkspaceConnectionProperties DeserializePATAuthTypeWorkspaceConnectionProperties(JsonElement element) - { - Optional credentials = default; - ConnectionAuthType authType = default; - Optional category = default; - Optional target = default; - Optional value = default; - Optional valueFormat = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - credentials = WorkspaceConnectionPersonalAccessToken.DeserializeWorkspaceConnectionPersonalAccessToken(property.Value); - continue; - } - if (property.NameEquals("authType")) - { - authType = new ConnectionAuthType(property.Value.GetString()); - continue; - } - if (property.NameEquals("category")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - category = new ConnectionCategory(property.Value.GetString()); - continue; - } - if (property.NameEquals("target")) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueFormat")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - valueFormat = new ValueFormat(property.Value.GetString()); - continue; - } - } - return new PATAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PATAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PATAuthTypeWorkspaceConnectionProperties.cs deleted file mode 100644 index bec7d2582e7f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PATAuthTypeWorkspaceConnectionProperties.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The PATAuthTypeWorkspaceConnectionProperties. - public partial class PATAuthTypeWorkspaceConnectionProperties : WorkspaceConnectionPropertiesV2 - { - /// Initializes a new instance of PATAuthTypeWorkspaceConnectionProperties. - public PATAuthTypeWorkspaceConnectionProperties() - { - AuthType = ConnectionAuthType.PAT; - } - - /// Initializes a new instance of PATAuthTypeWorkspaceConnectionProperties. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - /// - internal PATAuthTypeWorkspaceConnectionProperties(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat, WorkspaceConnectionPersonalAccessToken credentials) : base(authType, category, target, value, valueFormat) - { - Credentials = credentials; - AuthType = authType; - } - - /// Gets or sets the credentials. - internal WorkspaceConnectionPersonalAccessToken Credentials { get; set; } - /// Gets or sets the pat. - public string CredentialsPat - { - get => Credentials is null ? default : Credentials.Pat; - set - { - if (Credentials is null) - Credentials = new WorkspaceConnectionPersonalAccessToken(); - Credentials.Pat = value; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PaginatedComputeResourcesList.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PaginatedComputeResourcesList.cs index ef3e31498389..9e005a699974 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PaginatedComputeResourcesList.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PaginatedComputeResourcesList.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. + /// + /// Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. + /// Serialized Name: PaginatedComputeResourcesList + /// internal partial class PaginatedComputeResourcesList { /// Initializes a new instance of PaginatedComputeResourcesList. @@ -21,17 +24,29 @@ internal PaginatedComputeResourcesList() } /// Initializes a new instance of PaginatedComputeResourcesList. - /// An array of Machine Learning compute objects wrapped in ARM resource envelope. - /// A continuation link (absolute URI) to the next page of results in the list. + /// + /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + /// Serialized Name: PaginatedComputeResourcesList.value + /// + /// + /// A continuation link (absolute URI) to the next page of results in the list. + /// Serialized Name: PaginatedComputeResourcesList.nextLink + /// internal PaginatedComputeResourcesList(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + /// + /// An array of Machine Learning compute objects wrapped in ARM resource envelope. + /// Serialized Name: PaginatedComputeResourcesList.value + /// public IReadOnlyList Value { get; } - /// A continuation link (absolute URI) to the next page of results in the list. + /// + /// A continuation link (absolute URI) to the next page of results in the list. + /// Serialized Name: PaginatedComputeResourcesList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialBatchDeployment.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialBatchDeployment.cs index ed5e16fe6ad0..35109fba3168 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialBatchDeployment.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialBatchDeployment.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Mutable batch inference settings per deployment. + /// + /// Mutable batch inference settings per deployment. + /// Serialized Name: PartialBatchDeployment + /// internal partial class PartialBatchDeployment { /// Initializes a new instance of PartialBatchDeployment. @@ -15,7 +18,10 @@ public PartialBatchDeployment() { } - /// Description of the endpoint deployment. + /// + /// Description of the endpoint deployment. + /// Serialized Name: PartialBatchDeployment.description + /// public string Description { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialManagedServiceIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialManagedServiceIdentity.Serialization.cs deleted file mode 100644 index cbf9ddd9ae15..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialManagedServiceIdentity.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PartialManagedServiceIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ManagedServiceIdentityType)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(ManagedServiceIdentityType.Value.ToString()); - } - if (Optional.IsCollectionDefined(UserAssignedIdentities)) - { - writer.WritePropertyName("userAssignedIdentities"); - writer.WriteStartObject(); - foreach (var item in UserAssignedIdentities) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialManagedServiceIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialManagedServiceIdentity.cs deleted file mode 100644 index dd3d1e90428a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialManagedServiceIdentity.cs +++ /dev/null @@ -1,57 +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 -{ - /// Managed service identity (system assigned and/or user assigned identities). - public partial class PartialManagedServiceIdentity - { - /// Initializes a new instance of PartialManagedServiceIdentity. - public PartialManagedServiceIdentity() - { - UserAssignedIdentities = new ChangeTrackingDictionary(); - } - - /// Managed service identity (system assigned and/or user assigned identities). - public ManagedServiceIdentityType? ManagedServiceIdentityType { get; set; } - /// - /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 UserAssignedIdentities { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResource.Serialization.cs deleted file mode 100644 index c575a44e121b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResource.Serialization.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PartialMinimalTrackedResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResource.cs deleted file mode 100644 index 2f8c71e2e47f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResource.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Strictly used in update requests. - public partial class PartialMinimalTrackedResource - { - /// Initializes a new instance of PartialMinimalTrackedResource. - public PartialMinimalTrackedResource() - { - Tags = new ChangeTrackingDictionary(); - } - - /// Resource tags. - public IDictionary Tags { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResourceWithIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResourceWithIdentity.Serialization.cs deleted file mode 100644 index 145d24191e9b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResourceWithIdentity.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PartialMinimalTrackedResourceWithIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResourceWithIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResourceWithIdentity.cs deleted file mode 100644 index fffccb517c4f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialMinimalTrackedResourceWithIdentity.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Strictly used in update requests. - public partial class PartialMinimalTrackedResourceWithIdentity : PartialMinimalTrackedResource - { - /// Initializes a new instance of PartialMinimalTrackedResourceWithIdentity. - public PartialMinimalTrackedResourceWithIdentity() - { - } - - /// Managed service identity (system assigned and/or user assigned identities). - public PartialManagedServiceIdentity Identity { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialSku.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialSku.Serialization.cs deleted file mode 100644 index 46ae2d43153f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialSku.Serialization.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PartialSku : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Capacity)) - { - writer.WritePropertyName("capacity"); - writer.WriteNumberValue(Capacity.Value); - } - if (Optional.IsDefined(Family)) - { - writer.WritePropertyName("family"); - writer.WriteStringValue(Family); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Size)) - { - writer.WritePropertyName("size"); - writer.WriteStringValue(Size); - } - if (Optional.IsDefined(Tier)) - { - writer.WritePropertyName("tier"); - writer.WriteStringValue(Tier.Value.ToSerialString()); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialSku.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialSku.cs deleted file mode 100644 index 91d1380acc04..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PartialSku.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Common SKU definition. - public partial class PartialSku - { - /// Initializes a new instance of PartialSku. - public PartialSku() - { - } - - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PasswordDetail.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PasswordDetail.Serialization.cs deleted file mode 100644 index cbdd4ff0b961..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PasswordDetail.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PasswordDetail - { - internal static PasswordDetail DeserializePasswordDetail(JsonElement element) - { - Optional name = default; - Optional value = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - } - return new PasswordDetail(name.Value, value.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PasswordDetail.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PasswordDetail.cs deleted file mode 100644 index 8f0338df29cc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PasswordDetail.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The PasswordDetail. - public partial class PasswordDetail - { - /// Initializes a new instance of PasswordDetail. - internal PasswordDetail() - { - } - - /// Initializes a new instance of PasswordDetail. - /// - /// - internal PasswordDetail(string name, string value) - { - Name = name; - Value = value; - } - - /// Gets the name. - public string Name { get; } - /// Gets the value. - public string Value { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs index 5a26cfb64e9a..8bceba9fdb21 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.Serialization.cs @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static PersonalComputeInstanceSettings DeserializePersonalComputeInstanceSettings(JsonElement element) { - Optional assignedUser = default; + Optional assignedUser = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("assignedUser")) @@ -35,7 +35,7 @@ internal static PersonalComputeInstanceSettings DeserializePersonalComputeInstan property.ThrowNonNullablePropertyIsNull(); continue; } - assignedUser = AssignedUser.DeserializeAssignedUser(property.Value); + assignedUser = MachineLearningComputeInstanceAssignedUser.DeserializeMachineLearningComputeInstanceAssignedUser(property.Value); continue; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.cs index 3fe7043d7c61..9264c6dd0184 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PersonalComputeInstanceSettings.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Settings for a personal compute instance. + /// + /// Settings for a personal compute instance. + /// Serialized Name: PersonalComputeInstanceSettings + /// internal partial class PersonalComputeInstanceSettings { /// Initializes a new instance of PersonalComputeInstanceSettings. @@ -16,13 +19,19 @@ public PersonalComputeInstanceSettings() } /// Initializes a new instance of PersonalComputeInstanceSettings. - /// A user explicitly assigned to a personal compute instance. - internal PersonalComputeInstanceSettings(AssignedUser assignedUser) + /// + /// A user explicitly assigned to a personal compute instance. + /// Serialized Name: PersonalComputeInstanceSettings.assignedUser + /// + internal PersonalComputeInstanceSettings(MachineLearningComputeInstanceAssignedUser assignedUser) { AssignedUser = assignedUser; } - /// A user explicitly assigned to a personal compute instance. - public AssignedUser AssignedUser { get; set; } + /// + /// A user explicitly assigned to a personal compute instance. + /// Serialized Name: PersonalComputeInstanceSettings.assignedUser + /// + public MachineLearningComputeInstanceAssignedUser AssignedUser { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PipelineJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PipelineJob.Serialization.cs deleted file mode 100644 index 8142826f6373..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PipelineJob.Serialization.cs +++ /dev/null @@ -1,485 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PipelineJob : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Inputs)) - { - if (Inputs != null) - { - writer.WritePropertyName("inputs"); - writer.WriteStartObject(); - foreach (var item in Inputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("inputs"); - } - } - if (Optional.IsCollectionDefined(Jobs)) - { - if (Jobs != null) - { - writer.WritePropertyName("jobs"); - writer.WriteStartObject(); - foreach (var item in Jobs) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("jobs"); - } - } - if (Optional.IsCollectionDefined(Outputs)) - { - if (Outputs != null) - { - writer.WritePropertyName("outputs"); - writer.WriteStartObject(); - foreach (var item in Outputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("outputs"); - } - } - if (Optional.IsDefined(Settings)) - { - if (Settings != null) - { - writer.WritePropertyName("settings"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Settings); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(Settings.ToString()).RootElement); -#endif - } - else - { - writer.WriteNull("settings"); - } - } - if (Optional.IsDefined(SourceJobId)) - { - if (SourceJobId != null) - { - writer.WritePropertyName("sourceJobId"); - writer.WriteStringValue(SourceJobId); - } - else - { - writer.WriteNull("sourceJobId"); - } - } - if (Optional.IsDefined(ComponentId)) - { - if (ComponentId != null) - { - writer.WritePropertyName("componentId"); - writer.WriteStringValue(ComponentId); - } - else - { - writer.WriteNull("componentId"); - } - } - if (Optional.IsDefined(ComputeId)) - { - if (ComputeId != null) - { - writer.WritePropertyName("computeId"); - writer.WriteStringValue(ComputeId); - } - else - { - writer.WriteNull("computeId"); - } - } - if (Optional.IsDefined(DisplayName)) - { - if (DisplayName != null) - { - writer.WritePropertyName("displayName"); - writer.WriteStringValue(DisplayName); - } - else - { - writer.WriteNull("displayName"); - } - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsCollectionDefined(Services)) - { - if (Services != null) - { - writer.WritePropertyName("services"); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("services"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static PipelineJob DeserializePipelineJob(JsonElement element) - { - Optional> inputs = default; - Optional> jobs = default; - Optional> outputs = default; - Optional settings = default; - Optional sourceJobId = default; - Optional componentId = default; - Optional computeId = default; - Optional displayName = default; - Optional experimentName = default; - Optional identity = default; - Optional isArchived = default; - JobType jobType = default; - Optional> services = default; - Optional status = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("inputs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - inputs = 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, JobInput.DeserializeJobInput(property0.Value)); - } - } - inputs = dictionary; - continue; - } - if (property.NameEquals("jobs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - jobs = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); - } - jobs = dictionary; - continue; - } - if (property.NameEquals("outputs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - outputs = 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, JobOutput.DeserializeJobOutput(property0.Value)); - } - } - outputs = dictionary; - continue; - } - if (property.NameEquals("settings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - settings = null; - continue; - } - settings = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("sourceJobId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - sourceJobId = null; - continue; - } - sourceJobId = property.Value.GetString(); - continue; - } - if (property.NameEquals("componentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentId = null; - continue; - } - componentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - computeId = null; - continue; - } - computeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - displayName = null; - continue; - } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = IdentityConfiguration.DeserializeIdentityConfiguration(property.Value); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("services")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - services = 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, JobService.DeserializeJobService(property0.Value)); - } - } - services = dictionary; - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new JobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new PipelineJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), Optional.ToDictionary(inputs), Optional.ToDictionary(jobs), Optional.ToDictionary(outputs), settings.Value, sourceJobId.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PipelineJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PipelineJob.cs deleted file mode 100644 index f23eb8b20411..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PipelineJob.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.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Pipeline Job definition: defines generic to MFE attributes. - public partial class PipelineJob : MachineLearningJobProperties - { - /// Initializes a new instance of PipelineJob. - public PipelineJob() - { - Inputs = new ChangeTrackingDictionary(); - Jobs = new ChangeTrackingDictionary(); - Outputs = new ChangeTrackingDictionary(); - JobType = JobType.Pipeline; - } - - /// Initializes a new instance of PipelineJob. - /// 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?. - /// [Required] Specifies the type of 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. - internal PipelineJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, IdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, JobStatus? status, IDictionary inputs, IDictionary jobs, IDictionary outputs, BinaryData settings, string sourceJobId) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) - { - Inputs = inputs; - Jobs = jobs; - 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. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 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; } - /// - /// Pipeline settings, for things like ContinueRunOnStepFailure etc. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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 Settings { get; set; } - /// ARM resource ID of source job. - public string SourceJobId { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpoint.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpoint.Serialization.cs deleted file mode 100644 index 38bca66ab473..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpoint.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PrivateEndpoint : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static PrivateEndpoint DeserializePrivateEndpoint(JsonElement element) - { - Optional id = default; - Optional subnetArmId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("subnetArmId")) - { - subnetArmId = property.Value.GetString(); - continue; - } - } - return new PrivateEndpoint(id.Value, subnetArmId.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpoint.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpoint.cs deleted file mode 100644 index 25e63ce0408e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PrivateEndpoint.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The Private Endpoint resource. - public partial class PrivateEndpoint - { - /// Initializes a new instance of PrivateEndpoint. - public PrivateEndpoint() - { - } - - /// Initializes a new instance of PrivateEndpoint. - /// The ARM identifier for Private Endpoint. - /// The ARM identifier for Subnet resource that private endpoint links to. - internal PrivateEndpoint(string id, string subnetArmId) - { - Id = id; - SubnetArmId = subnetArmId; - } - - /// The ARM identifier for Private Endpoint. - public string Id { get; } - /// The ARM identifier for Subnet resource that private endpoint links to. - public string SubnetArmId { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProbeSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProbeSettings.Serialization.cs deleted file mode 100644 index 11b44d816b24..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProbeSettings.Serialization.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ProbeSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(FailureThreshold)) - { - writer.WritePropertyName("failureThreshold"); - writer.WriteNumberValue(FailureThreshold.Value); - } - if (Optional.IsDefined(InitialDelay)) - { - if (InitialDelay != null) - { - writer.WritePropertyName("initialDelay"); - writer.WriteStringValue(InitialDelay.Value, "P"); - } - else - { - writer.WriteNull("initialDelay"); - } - } - if (Optional.IsDefined(Period)) - { - writer.WritePropertyName("period"); - writer.WriteStringValue(Period.Value, "P"); - } - if (Optional.IsDefined(SuccessThreshold)) - { - writer.WritePropertyName("successThreshold"); - writer.WriteNumberValue(SuccessThreshold.Value); - } - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(Timeout.Value, "P"); - } - writer.WriteEndObject(); - } - - internal static ProbeSettings DeserializeProbeSettings(JsonElement element) - { - Optional failureThreshold = default; - Optional initialDelay = default; - Optional period = default; - Optional successThreshold = default; - Optional timeout = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("failureThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - failureThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("initialDelay")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - initialDelay = null; - continue; - } - initialDelay = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("period")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - period = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("successThreshold")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - successThreshold = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("timeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - } - return new ProbeSettings(Optional.ToNullable(failureThreshold), Optional.ToNullable(initialDelay), Optional.ToNullable(period), Optional.ToNullable(successThreshold), Optional.ToNullable(timeout)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProbeSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProbeSettings.cs deleted file mode 100644 index 13a9c3220b0c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProbeSettings.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Deployment container liveness/readiness probe configuration. - public partial class ProbeSettings - { - /// Initializes a new instance of ProbeSettings. - public ProbeSettings() - { - } - - /// Initializes a new instance of ProbeSettings. - /// 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. - internal ProbeSettings(int? failureThreshold, TimeSpan? initialDelay, TimeSpan? period, int? successThreshold, TimeSpan? timeout) - { - FailureThreshold = failureThreshold; - InitialDelay = initialDelay; - Period = period; - SuccessThreshold = successThreshold; - Timeout = timeout; - } - - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index ee7daf56492b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProvisioningState.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.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning. - public readonly partial struct ProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UnknownValue = "Unknown"; - private const string UpdatingValue = "Updating"; - private const string CreatingValue = "Creating"; - private const string DeletingValue = "Deleting"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Unknown. - public static ProvisioningState Unknown { get; } = new ProvisioningState(UnknownValue); - /// Updating. - public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); - /// Creating. - public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); - /// Deleting. - public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); - /// Succeeded. - public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); - /// Failed. - public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); - /// Canceled. - public static ProvisioningState Canceled { get; } = new ProvisioningState(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); - /// - public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProvisioningStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProvisioningStatus.cs deleted file mode 100644 index 948583e1f067..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ProvisioningStatus.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 current deployment state of schedule. - public readonly partial struct ProvisioningStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ProvisioningStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CompletedValue = "Completed"; - private const string ProvisioningValue = "Provisioning"; - private const string FailedValue = "Failed"; - - /// Completed. - public static ProvisioningStatus Completed { get; } = new ProvisioningStatus(CompletedValue); - /// Provisioning. - public static ProvisioningStatus Provisioning { get; } = new ProvisioningStatus(ProvisioningValue); - /// Failed. - public static ProvisioningStatus Failed { get; } = new ProvisioningStatus(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(ProvisioningStatus left, ProvisioningStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ProvisioningStatus left, ProvisioningStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ProvisioningStatus(string value) => new ProvisioningStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ProvisioningStatus other && Equals(other); - /// - public bool Equals(ProvisioningStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccess.cs deleted file mode 100644 index 89b5caab61e3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccess.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 -{ - /// 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?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccessType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccessType.cs deleted file mode 100644 index 98f46a1464b6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PublicNetworkAccessType.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 whether PublicNetworkAccess is Enabled or Disabled. - public readonly partial struct PublicNetworkAccessType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public PublicNetworkAccessType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static PublicNetworkAccessType Enabled { get; } = new PublicNetworkAccessType(EnabledValue); - /// Disabled. - public static PublicNetworkAccessType Disabled { get; } = new PublicNetworkAccessType(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(PublicNetworkAccessType left, PublicNetworkAccessType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(PublicNetworkAccessType left, PublicNetworkAccessType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator PublicNetworkAccessType(string value) => new PublicNetworkAccessType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is PublicNetworkAccessType other && Equals(other); - /// - public bool Equals(PublicNetworkAccessType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorch.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorch.Serialization.cs deleted file mode 100644 index 470b5aad88f5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorch.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class PyTorch : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ProcessCountPerInstance)) - { - if (ProcessCountPerInstance != null) - { - writer.WritePropertyName("processCountPerInstance"); - writer.WriteNumberValue(ProcessCountPerInstance.Value); - } - else - { - writer.WriteNull("processCountPerInstance"); - } - } - writer.WritePropertyName("distributionType"); - writer.WriteStringValue(DistributionType.ToString()); - writer.WriteEndObject(); - } - - internal static PyTorch DeserializePyTorch(JsonElement element) - { - Optional processCountPerInstance = default; - DistributionType distributionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("processCountPerInstance")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - processCountPerInstance = null; - continue; - } - processCountPerInstance = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("distributionType")) - { - distributionType = new DistributionType(property.Value.GetString()); - continue; - } - } - return new PyTorch(distributionType, Optional.ToNullable(processCountPerInstance)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorch.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorch.cs deleted file mode 100644 index 1dd9483639f3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorch.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// PyTorch distribution configuration. - public partial class PyTorch : DistributionConfiguration - { - /// Initializes a new instance of PyTorch. - public PyTorch() - { - DistributionType = DistributionType.PyTorch; - } - - /// Initializes a new instance of PyTorch. - /// [Required] Specifies the type of distribution framework. - /// Number of processes per node. - internal PyTorch(DistributionType distributionType, int? processCountPerInstance) : base(distributionType) - { - ProcessCountPerInstance = processCountPerInstance; - DistributionType = distributionType; - } - - /// Number of processes per node. - public int? ProcessCountPerInstance { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorchDistributionConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorchDistributionConfiguration.Serialization.cs new file mode 100644 index 000000000000..03e594cd98f7 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorchDistributionConfiguration.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class PyTorchDistributionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ProcessCountPerInstance)) + { + if (ProcessCountPerInstance != null) + { + writer.WritePropertyName("processCountPerInstance"); + writer.WriteNumberValue(ProcessCountPerInstance.Value); + } + else + { + writer.WriteNull("processCountPerInstance"); + } + } + writer.WritePropertyName("distributionType"); + writer.WriteStringValue(DistributionType.ToString()); + writer.WriteEndObject(); + } + + internal static PyTorchDistributionConfiguration DeserializePyTorchDistributionConfiguration(JsonElement element) + { + Optional processCountPerInstance = default; + DistributionType distributionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("processCountPerInstance")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + processCountPerInstance = null; + continue; + } + processCountPerInstance = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("distributionType")) + { + distributionType = new DistributionType(property.Value.GetString()); + continue; + } + } + return new PyTorchDistributionConfiguration(distributionType, Optional.ToNullable(processCountPerInstance)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorchDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorchDistributionConfiguration.cs new file mode 100644 index 000000000000..efdbeaa34a92 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/PyTorchDistributionConfiguration.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// PyTorch distribution configuration. + /// Serialized Name: PyTorch + /// + public partial class PyTorchDistributionConfiguration : MachineLearningDistributionConfiguration + { + /// Initializes a new instance of PyTorchDistributionConfiguration. + public PyTorchDistributionConfiguration() + { + DistributionType = DistributionType.PyTorch; + } + + /// Initializes a new instance of PyTorchDistributionConfiguration. + /// + /// [Required] Specifies the type of distribution framework. + /// Serialized Name: DistributionConfiguration.distributionType + /// + /// + /// Number of processes per node. + /// Serialized Name: PyTorch.processCountPerInstance + /// + internal PyTorchDistributionConfiguration(DistributionType distributionType, int? processCountPerInstance) : base(distributionType) + { + ProcessCountPerInstance = processCountPerInstance; + DistributionType = distributionType; + } + + /// + /// Number of processes per node. + /// Serialized Name: PyTorch.processCountPerInstance + /// + public int? ProcessCountPerInstance { get; set; } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaBaseProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaBaseProperties.Serialization.cs deleted file mode 100644 index 130708248f6c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaBaseProperties.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class QuotaBaseProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(QuotaBasePropertiesType)) - { - writer.WritePropertyName("type"); - writer.WriteStringValue(QuotaBasePropertiesType); - } - if (Optional.IsDefined(Limit)) - { - writer.WritePropertyName("limit"); - writer.WriteNumberValue(Limit.Value); - } - if (Optional.IsDefined(Unit)) - { - writer.WritePropertyName("unit"); - writer.WriteStringValue(Unit.Value.ToString()); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaBaseProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaBaseProperties.cs deleted file mode 100644 index 94a318e73afc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaBaseProperties.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The properties for Quota update or retrieval. - public partial class QuotaBaseProperties - { - /// Initializes a new instance of QuotaBaseProperties. - public QuotaBaseProperties() - { - } - - /// Specifies the resource ID. - public string Id { get; set; } - /// Specifies the resource type. - public string QuotaBasePropertiesType { get; set; } - /// The maximum permitted quota of the resource. - public long? Limit { get; set; } - /// An enum describing the unit of quota measurement. - public QuotaUnit? Unit { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUnit.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUnit.cs deleted file mode 100644 index 5618995103a1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUnit.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// An enum describing the unit of quota measurement. - public readonly partial struct QuotaUnit : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public QuotaUnit(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountValue = "Count"; - - /// Count. - public static QuotaUnit Count { get; } = new QuotaUnit(CountValue); - /// Determines if two values are the same. - public static bool operator ==(QuotaUnit left, QuotaUnit right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(QuotaUnit left, QuotaUnit right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator QuotaUnit(string value) => new QuotaUnit(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is QuotaUnit other && Equals(other); - /// - public bool Equals(QuotaUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUpdateContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUpdateContent.Serialization.cs deleted file mode 100644 index e29610d856a0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUpdateContent.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class QuotaUpdateContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsCollectionDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"); - writer.WriteStringValue(Location.Value); - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUpdateContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUpdateContent.cs deleted file mode 100644 index 7f168de40e18..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/QuotaUpdateContent.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Quota update parameters. - public partial class QuotaUpdateContent - { - /// Initializes a new instance of QuotaUpdateContent. - public QuotaUpdateContent() - { - Value = new ChangeTrackingList(); - } - - /// The list for update quota. - public IList Value { get; } - /// Region of workspace quota to be updated. - public AzureLocation? Location { get; set; } - } -} 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 d82bf35528f3..5e784f6cd53a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithm.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Defines a Sampling Algorithm that generates values randomly. + /// + /// Defines a Sampling Algorithm that generates values randomly + /// Serialized Name: RandomSamplingAlgorithm + /// public partial class RandomSamplingAlgorithm : SamplingAlgorithm { /// Initializes a new instance of RandomSamplingAlgorithm. @@ -17,9 +20,18 @@ public RandomSamplingAlgorithm() } /// Initializes a new instance of RandomSamplingAlgorithm. - /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. - /// The specific type of random algorithm. - /// An optional integer to use as the seed for random number generation. + /// + /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties + /// Serialized Name: SamplingAlgorithm.samplingAlgorithmType + /// + /// + /// The specific type of random algorithm + /// Serialized Name: RandomSamplingAlgorithm.rule + /// + /// + /// An optional integer to use as the seed for random number generation + /// Serialized Name: RandomSamplingAlgorithm.seed + /// internal RandomSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType, RandomSamplingAlgorithmRule? rule, int? seed) : base(samplingAlgorithmType) { Rule = rule; @@ -27,9 +39,15 @@ internal RandomSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType, Ra SamplingAlgorithmType = samplingAlgorithmType; } - /// The specific type of random algorithm. + /// + /// The specific type of random algorithm + /// Serialized Name: RandomSamplingAlgorithm.rule + /// public RandomSamplingAlgorithmRule? Rule { get; set; } - /// An optional integer to use as the seed for random number generation. + /// + /// An optional integer to use as the seed for random number generation + /// Serialized Name: RandomSamplingAlgorithm.seed + /// public int? Seed { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithmRule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithmRule.cs index 60a71b178add..73e29b62f99a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithmRule.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RandomSamplingAlgorithmRule.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The specific type of random algorithm. + /// + /// The specific type of random algorithm + /// Serialized Name: RandomSamplingAlgorithmRule + /// public readonly partial struct RandomSamplingAlgorithmRule : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public RandomSamplingAlgorithmRule(string value) private const string RandomValue = "Random"; private const string SobolValue = "Sobol"; - /// Random. + /// + /// Random + /// Serialized Name: RandomSamplingAlgorithmRule.Random + /// public static RandomSamplingAlgorithmRule Random { get; } = new RandomSamplingAlgorithmRule(RandomValue); - /// Sobol. + /// + /// Sobol + /// Serialized Name: RandomSamplingAlgorithmRule.Sobol + /// public static RandomSamplingAlgorithmRule Sobol { get; } = new RandomSamplingAlgorithmRule(SobolValue); /// Determines if two values are the same. public static bool operator ==(RandomSamplingAlgorithmRule left, RandomSamplingAlgorithmRule right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceFrequency.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceFrequency.cs deleted file mode 100644 index 8ca34f870f0f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceFrequency.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 -{ - /// Enum to describe the frequency of a recurrence schedule. - public readonly partial struct RecurrenceFrequency : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RecurrenceFrequency(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MinuteValue = "Minute"; - private const string HourValue = "Hour"; - private const string DayValue = "Day"; - private const string WeekValue = "Week"; - private const string MonthValue = "Month"; - - /// Minute frequency. - public static RecurrenceFrequency Minute { get; } = new RecurrenceFrequency(MinuteValue); - /// Hour frequency. - public static RecurrenceFrequency Hour { get; } = new RecurrenceFrequency(HourValue); - /// Day frequency. - public static RecurrenceFrequency Day { get; } = new RecurrenceFrequency(DayValue); - /// Week frequency. - public static RecurrenceFrequency Week { get; } = new RecurrenceFrequency(WeekValue); - /// Month frequency. - public static RecurrenceFrequency Month { get; } = new RecurrenceFrequency(MonthValue); - /// Determines if two values are the same. - public static bool operator ==(RecurrenceFrequency left, RecurrenceFrequency right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RecurrenceFrequency left, RecurrenceFrequency right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RecurrenceFrequency(string value) => new RecurrenceFrequency(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RecurrenceFrequency other && Equals(other); - /// - public bool Equals(RecurrenceFrequency other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceSchedule.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceSchedule.Serialization.cs deleted file mode 100644 index 32785109abaf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceSchedule.Serialization.cs +++ /dev/null @@ -1,132 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RecurrenceSchedule : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("hours"); - writer.WriteStartArray(); - foreach (var item in Hours) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("minutes"); - writer.WriteStartArray(); - foreach (var item in Minutes) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - if (Optional.IsCollectionDefined(MonthDays)) - { - if (MonthDays != null) - { - writer.WritePropertyName("monthDays"); - writer.WriteStartArray(); - foreach (var item in MonthDays) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("monthDays"); - } - } - if (Optional.IsCollectionDefined(WeekDays)) - { - if (WeekDays != null) - { - writer.WritePropertyName("weekDays"); - writer.WriteStartArray(); - foreach (var item in WeekDays) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("weekDays"); - } - } - writer.WriteEndObject(); - } - - internal static RecurrenceSchedule DeserializeRecurrenceSchedule(JsonElement element) - { - IList hours = default; - IList minutes = default; - Optional> monthDays = default; - Optional> weekDays = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("hours")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - hours = array; - continue; - } - if (property.NameEquals("minutes")) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - minutes = array; - continue; - } - if (property.NameEquals("monthDays")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - monthDays = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - monthDays = array; - continue; - } - if (property.NameEquals("weekDays")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - weekDays = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new WeekDay(item.GetString())); - } - weekDays = array; - continue; - } - } - return new RecurrenceSchedule(hours, minutes, Optional.ToList(monthDays), Optional.ToList(weekDays)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceSchedule.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceSchedule.cs deleted file mode 100644 index 92cbf9ffd3d6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceSchedule.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; -using System.Linq; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RecurrenceSchedule. - public partial class RecurrenceSchedule - { - /// Initializes a new instance of RecurrenceSchedule. - /// [Required] List of hours for the schedule. - /// [Required] List of minutes for the schedule. - /// or is null. - public RecurrenceSchedule(IEnumerable hours, IEnumerable minutes) - { - Argument.AssertNotNull(hours, nameof(hours)); - Argument.AssertNotNull(minutes, nameof(minutes)); - - Hours = hours.ToList(); - Minutes = minutes.ToList(); - MonthDays = new ChangeTrackingList(); - WeekDays = new ChangeTrackingList(); - } - - /// Initializes a new instance of RecurrenceSchedule. - /// [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. - internal RecurrenceSchedule(IList hours, IList minutes, IList monthDays, IList weekDays) - { - Hours = hours; - Minutes = minutes; - MonthDays = monthDays; - WeekDays = weekDays; - } - - /// [Required] List of hours for the schedule. - 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceTrigger.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceTrigger.Serialization.cs deleted file mode 100644 index 00e7e986029d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceTrigger.Serialization.cs +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RecurrenceTrigger : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("frequency"); - writer.WriteStringValue(Frequency.ToString()); - writer.WritePropertyName("interval"); - writer.WriteNumberValue(Interval); - if (Optional.IsDefined(Schedule)) - { - if (Schedule != null) - { - writer.WritePropertyName("schedule"); - writer.WriteObjectValue(Schedule); - } - else - { - writer.WriteNull("schedule"); - } - } - if (Optional.IsDefined(EndTime)) - { - if (EndTime != null) - { - writer.WritePropertyName("endTime"); - writer.WriteStringValue(EndTime); - } - else - { - writer.WriteNull("endTime"); - } - } - if (Optional.IsDefined(StartTime)) - { - if (StartTime != null) - { - writer.WritePropertyName("startTime"); - writer.WriteStringValue(StartTime); - } - else - { - writer.WriteNull("startTime"); - } - } - if (Optional.IsDefined(TimeZone)) - { - writer.WritePropertyName("timeZone"); - writer.WriteStringValue(TimeZone); - } - writer.WritePropertyName("triggerType"); - writer.WriteStringValue(TriggerType.ToString()); - writer.WriteEndObject(); - } - - internal static RecurrenceTrigger DeserializeRecurrenceTrigger(JsonElement element) - { - RecurrenceFrequency frequency = default; - int interval = default; - Optional schedule = default; - Optional endTime = default; - Optional startTime = default; - Optional timeZone = default; - TriggerType triggerType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("frequency")) - { - frequency = new RecurrenceFrequency(property.Value.GetString()); - continue; - } - if (property.NameEquals("interval")) - { - interval = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("schedule")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - schedule = null; - continue; - } - schedule = RecurrenceSchedule.DeserializeRecurrenceSchedule(property.Value); - continue; - } - if (property.NameEquals("endTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - endTime = null; - continue; - } - endTime = property.Value.GetString(); - continue; - } - if (property.NameEquals("startTime")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - startTime = null; - continue; - } - startTime = property.Value.GetString(); - continue; - } - if (property.NameEquals("timeZone")) - { - timeZone = property.Value.GetString(); - continue; - } - if (property.NameEquals("triggerType")) - { - triggerType = new TriggerType(property.Value.GetString()); - continue; - } - } - return new RecurrenceTrigger(endTime.Value, startTime.Value, timeZone.Value, triggerType, frequency, interval, schedule.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceTrigger.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceTrigger.cs deleted file mode 100644 index 83549bbf387a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RecurrenceTrigger.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RecurrenceTrigger. - public partial class RecurrenceTrigger : TriggerBase - { - /// Initializes a new instance of RecurrenceTrigger. - /// [Required] The frequency to trigger schedule. - /// [Required] Specifies schedule interval in conjunction with frequency. - public RecurrenceTrigger(RecurrenceFrequency frequency, int interval) - { - Frequency = frequency; - Interval = interval; - TriggerType = TriggerType.Recurrence; - } - - /// Initializes a new instance of RecurrenceTrigger. - /// - /// 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" - /// If not present, the schedule will run indefinitely - /// - /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - /// - /// 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]. - /// [Required] The frequency to trigger schedule. - /// [Required] Specifies schedule interval in conjunction with frequency. - /// The recurrence schedule. - internal RecurrenceTrigger(string endTime, string startTime, string timeZone, TriggerType triggerType, RecurrenceFrequency frequency, int interval, RecurrenceSchedule schedule) : base(endTime, startTime, timeZone, triggerType) - { - Frequency = frequency; - Interval = interval; - Schedule = schedule; - TriggerType = triggerType; - } - - /// [Required] The frequency to trigger schedule. - public RecurrenceFrequency Frequency { get; set; } - /// [Required] Specifies schedule interval in conjunction with frequency. - public int Interval { get; set; } - /// The recurrence schedule. - public RecurrenceSchedule Schedule { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ReferenceType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ReferenceType.cs index 3d98115d84b2..4cf6819c8e09 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ReferenceType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ReferenceType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine which reference method to use for an asset. + /// + /// Enum to determine which reference method to use for an asset. + /// Serialized Name: ReferenceType + /// internal readonly partial struct ReferenceType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public ReferenceType(string value) private const string DataPathValue = "DataPath"; private const string OutputPathValue = "OutputPath"; - /// Id. + /// + /// Id + /// Serialized Name: ReferenceType.Id + /// public static ReferenceType Id { get; } = new ReferenceType(IdValue); - /// DataPath. + /// + /// DataPath + /// Serialized Name: ReferenceType.DataPath + /// public static ReferenceType DataPath { get; } = new ReferenceType(DataPathValue); - /// OutputPath. + /// + /// OutputPath + /// Serialized Name: ReferenceType.OutputPath + /// public static ReferenceType OutputPath { get; } = new ReferenceType(OutputPathValue); /// Determines if two values are the same. public static bool operator ==(ReferenceType left, ReferenceType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateEndpointKeysContent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateEndpointKeysContent.Serialization.cs deleted file mode 100644 index 28c1d676ec72..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateEndpointKeysContent.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RegenerateEndpointKeysContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("keyType"); - writer.WriteStringValue(KeyType.ToString()); - if (Optional.IsDefined(KeyValue)) - { - if (KeyValue != null) - { - writer.WritePropertyName("keyValue"); - writer.WriteStringValue(KeyValue); - } - else - { - writer.WriteNull("keyValue"); - } - } - writer.WriteEndObject(); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateEndpointKeysContent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateEndpointKeysContent.cs deleted file mode 100644 index 3aeff213580a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegenerateEndpointKeysContent.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RegenerateEndpointKeysContent. - public partial class RegenerateEndpointKeysContent - { - /// Initializes a new instance of RegenerateEndpointKeysContent. - /// [Required] Specification for which type of key to generate. Primary or Secondary. - public RegenerateEndpointKeysContent(KeyType keyType) - { - KeyType = keyType; - } - - /// [Required] Specification for which type of key to generate. Primary or Secondary. - public KeyType KeyType { get; } - /// The value the key is set to. - public string KeyValue { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs deleted file mode 100644 index 92ac37519123..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryListCredentialsResult.Serialization.cs +++ /dev/null @@ -1,57 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class RegistryListCredentialsResult - { - internal static RegistryListCredentialsResult DeserializeRegistryListCredentialsResult(JsonElement element) - { - Optional location = default; - Optional username = default; - Optional> passwords = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("location")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("username")) - { - username = property.Value.GetString(); - continue; - } - if (property.NameEquals("passwords")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(PasswordDetail.DeserializePasswordDetail(item)); - } - passwords = array; - continue; - } - } - return new RegistryListCredentialsResult(Optional.ToNullable(location), username.Value, Optional.ToList(passwords)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryListCredentialsResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryListCredentialsResult.cs deleted file mode 100644 index 554888cdb4a0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegistryListCredentialsResult.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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The RegistryListCredentialsResult. - public partial class RegistryListCredentialsResult - { - /// Initializes a new instance of RegistryListCredentialsResult. - internal RegistryListCredentialsResult() - { - Passwords = new ChangeTrackingList(); - } - - /// Initializes a new instance of RegistryListCredentialsResult. - /// - /// - /// - internal RegistryListCredentialsResult(AzureLocation? location, string username, IReadOnlyList passwords) - { - Location = location; - Username = username; - Passwords = passwords; - } - - /// Gets the location. - public AzureLocation? Location { get; } - /// Gets the username. - public string Username { get; } - /// Gets the passwords. - public IReadOnlyList Passwords { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Regression.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Regression.Serialization.cs deleted file mode 100644 index 67827b9293f9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Regression.Serialization.cs +++ /dev/null @@ -1,341 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Regression : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(PrimaryMetric)) - { - writer.WritePropertyName("primaryMetric"); - writer.WriteStringValue(PrimaryMetric.Value.ToString()); - } - if (Optional.IsDefined(TrainingSettings)) - { - if (TrainingSettings != null) - { - writer.WritePropertyName("trainingSettings"); - writer.WriteObjectValue(TrainingSettings); - } - else - { - writer.WriteNull("trainingSettings"); - } - } - if (Optional.IsCollectionDefined(CvSplitColumnNames)) - { - if (CvSplitColumnNames != null) - { - writer.WritePropertyName("cvSplitColumnNames"); - 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"); - writer.WriteObjectValue(FeaturizationSettings); - } - else - { - writer.WriteNull("featurizationSettings"); - } - } - if (Optional.IsDefined(LimitSettings)) - { - if (LimitSettings != null) - { - writer.WritePropertyName("limitSettings"); - writer.WriteObjectValue(LimitSettings); - } - else - { - writer.WriteNull("limitSettings"); - } - } - if (Optional.IsDefined(NCrossValidations)) - { - if (NCrossValidations != null) - { - writer.WritePropertyName("nCrossValidations"); - writer.WriteObjectValue(NCrossValidations); - } - else - { - writer.WriteNull("nCrossValidations"); - } - } - if (Optional.IsDefined(TestData)) - { - if (TestData != null) - { - writer.WritePropertyName("testData"); - writer.WriteObjectValue(TestData); - } - else - { - writer.WriteNull("testData"); - } - } - if (Optional.IsDefined(TestDataSize)) - { - if (TestDataSize != null) - { - writer.WritePropertyName("testDataSize"); - writer.WriteNumberValue(TestDataSize.Value); - } - else - { - writer.WriteNull("testDataSize"); - } - } - if (Optional.IsDefined(ValidationData)) - { - if (ValidationData != null) - { - writer.WritePropertyName("validationData"); - writer.WriteObjectValue(ValidationData); - } - else - { - writer.WriteNull("validationData"); - } - } - if (Optional.IsDefined(ValidationDataSize)) - { - if (ValidationDataSize != null) - { - writer.WritePropertyName("validationDataSize"); - writer.WriteNumberValue(ValidationDataSize.Value); - } - else - { - writer.WriteNull("validationDataSize"); - } - } - if (Optional.IsDefined(WeightColumnName)) - { - if (WeightColumnName != null) - { - writer.WritePropertyName("weightColumnName"); - writer.WriteStringValue(WeightColumnName); - } - else - { - writer.WriteNull("weightColumnName"); - } - } - if (Optional.IsDefined(LogVerbosity)) - { - writer.WritePropertyName("logVerbosity"); - writer.WriteStringValue(LogVerbosity.Value.ToString()); - } - if (Optional.IsDefined(TargetColumnName)) - { - if (TargetColumnName != null) - { - writer.WritePropertyName("targetColumnName"); - writer.WriteStringValue(TargetColumnName); - } - else - { - writer.WriteNull("targetColumnName"); - } - } - writer.WritePropertyName("taskType"); - writer.WriteStringValue(TaskType.ToString()); - writer.WritePropertyName("trainingData"); - writer.WriteObjectValue(TrainingData); - writer.WriteEndObject(); - } - - internal static Regression DeserializeRegression(JsonElement element) - { - Optional primaryMetric = default; - Optional trainingSettings = default; - Optional> cvSplitColumnNames = default; - Optional featurizationSettings = default; - Optional limitSettings = default; - Optional nCrossValidations = default; - Optional testData = default; - Optional testDataSize = default; - Optional validationData = default; - Optional validationDataSize = default; - Optional weightColumnName = default; - Optional logVerbosity = default; - Optional targetColumnName = default; - TaskType taskType = default; - MLTableJobInput trainingData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("primaryMetric")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - primaryMetric = new RegressionPrimaryMetric(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - trainingSettings = null; - continue; - } - trainingSettings = RegressionTrainingSettings.DeserializeRegressionTrainingSettings(property.Value); - continue; - } - if (property.NameEquals("cvSplitColumnNames")) - { - 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")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - featurizationSettings = null; - continue; - } - featurizationSettings = TableVerticalFeaturizationSettings.DeserializeTableVerticalFeaturizationSettings(property.Value); - continue; - } - if (property.NameEquals("limitSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - limitSettings = null; - continue; - } - limitSettings = TableVerticalLimitSettings.DeserializeTableVerticalLimitSettings(property.Value); - continue; - } - if (property.NameEquals("nCrossValidations")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nCrossValidations = null; - continue; - } - nCrossValidations = NCrossValidations.DeserializeNCrossValidations(property.Value); - continue; - } - if (property.NameEquals("testData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - testData = null; - continue; - } - testData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); - continue; - } - if (property.NameEquals("testDataSize")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - testDataSize = null; - continue; - } - testDataSize = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("validationData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationData = null; - continue; - } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); - continue; - } - if (property.NameEquals("validationDataSize")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - validationDataSize = null; - continue; - } - validationDataSize = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("weightColumnName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - weightColumnName = null; - continue; - } - weightColumnName = property.Value.GetString(); - continue; - } - if (property.NameEquals("logVerbosity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - logVerbosity = new LogVerbosity(property.Value.GetString()); - continue; - } - if (property.NameEquals("targetColumnName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - targetColumnName = null; - continue; - } - targetColumnName = property.Value.GetString(); - continue; - } - if (property.NameEquals("taskType")) - { - taskType = new TaskType(property.Value.GetString()); - continue; - } - if (property.NameEquals("trainingData")) - { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); - continue; - } - } - return new Regression(Optional.ToNullable(logVerbosity), targetColumnName.Value, taskType, trainingData, Optional.ToNullable(primaryMetric), trainingSettings.Value, Optional.ToList(cvSplitColumnNames), featurizationSettings.Value, limitSettings.Value, nCrossValidations.Value, testData.Value, Optional.ToNullable(testDataSize), validationData.Value, Optional.ToNullable(validationDataSize), weightColumnName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Regression.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Regression.cs deleted file mode 100644 index cb61fc5f6e81..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Regression.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 -{ - /// Regression task in AutoML Table vertical. - public partial class Regression : AutoMLVertical - { - /// Initializes a new instance of Regression. - /// [Required] Training data input. - /// is null. - public Regression(MLTableJobInput trainingData) : base(trainingData) - { - Argument.AssertNotNull(trainingData, nameof(trainingData)); - - CvSplitColumnNames = new ChangeTrackingList(); - TaskType = TaskType.Regression; - } - - /// Initializes a new instance of Regression. - /// 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] Task type for AutoMLJob. - /// [Required] Training data input. - /// 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 - /// when validation dataset is not provided. - /// Please note is the base class. According to the scenario, a derived class 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 . - /// - /// Test data input. - /// - /// 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. - /// - /// Validation data inputs. - /// - /// 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. - /// - /// 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 Regression(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, RegressionPrimaryMetric? primaryMetric, RegressionTrainingSettings trainingSettings, IList cvSplitColumnNames, TableVerticalFeaturizationSettings featurizationSettings, TableVerticalLimitSettings limitSettings, NCrossValidations nCrossValidations, MLTableJobInput testData, double? testDataSize, MLTableJobInput validationData, double? validationDataSize, string weightColumnName) : base(logVerbosity, targetColumnName, taskType, trainingData) - { - PrimaryMetric = primaryMetric; - TrainingSettings = trainingSettings; - CvSplitColumnNames = cvSplitColumnNames; - FeaturizationSettings = featurizationSettings; - LimitSettings = limitSettings; - NCrossValidations = nCrossValidations; - TestData = testData; - TestDataSize = testDataSize; - ValidationData = validationData; - ValidationDataSize = validationDataSize; - WeightColumnName = weightColumnName; - TaskType = taskType; - } - - /// Primary metric for regression task. - public RegressionPrimaryMetric? 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; } - /// - /// Number of cross validation folds to be applied on training dataset - /// when validation dataset is not provided. - /// Please note is the base class. According to the scenario, a derived class 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 NCrossValidations NCrossValidations { get; set; } - /// Test data input. - public MLTableJobInput TestData { get; set; } - /// - /// 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? TestDataSize { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } - /// - /// 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? 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModel.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModel.cs deleted file mode 100644 index 768c655caa42..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionModel.cs +++ /dev/null @@ -1,89 +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 for all Regression models supported by AutoML. - public readonly partial struct RegressionModel : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RegressionModel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ElasticNetValue = "ElasticNet"; - private const string GradientBoostingValue = "GradientBoosting"; - private const string DecisionTreeValue = "DecisionTree"; - private const string KNNValue = "KNN"; - private const string LassoLarsValue = "LassoLars"; - private const string SGDValue = "SGD"; - private const string RandomForestValue = "RandomForest"; - private const string ExtremeRandomTreesValue = "ExtremeRandomTrees"; - private const string LightGBMValue = "LightGBM"; - private const string XGBoostRegressorValue = "XGBoostRegressor"; - - /// Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions. - public static RegressionModel ElasticNet { get; } = new RegressionModel(ElasticNetValue); - /// The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution. - public static RegressionModel GradientBoosting { get; } = new RegressionModel(GradientBoostingValue); - /// - /// Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. - /// The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. - /// - public static RegressionModel DecisionTree { get; } = new RegressionModel(DecisionTreeValue); - /// - /// K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints - /// which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. - /// - public static RegressionModel KNN { get; } = new RegressionModel(KNNValue); - /// Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer. - public static RegressionModel LassoLars { get; } = new RegressionModel(LassoLarsValue); - /// - /// SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications - /// to find the model parameters that correspond to the best fit between predicted and actual outputs. - /// It's an inexact but powerful technique. - /// - public static RegressionModel SGD { get; } = new RegressionModel(SGDValue); - /// - /// Random forest is a supervised learning algorithm. - /// The "forest" it builds, is an ensemble of decision trees, usually trained with the “bagging” method. - /// The general idea of the bagging method is that a combination of learning models increases the overall result. - /// - public static RegressionModel RandomForest { get; } = new RegressionModel(RandomForestValue); - /// Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm. - public static RegressionModel ExtremeRandomTrees { get; } = new RegressionModel(ExtremeRandomTreesValue); - /// LightGBM is a gradient boosting framework that uses tree based learning algorithms. - public static RegressionModel LightGBM { get; } = new RegressionModel(LightGBMValue); - /// XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners. - public static RegressionModel XGBoostRegressor { get; } = new RegressionModel(XGBoostRegressorValue); - /// Determines if two values are the same. - public static bool operator ==(RegressionModel left, RegressionModel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RegressionModel left, RegressionModel right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RegressionModel(string value) => new RegressionModel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RegressionModel other && Equals(other); - /// - public bool Equals(RegressionModel other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionPrimaryMetric.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionPrimaryMetric.cs deleted file mode 100644 index e18edc45009c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionPrimaryMetric.cs +++ /dev/null @@ -1,57 +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 -{ - /// Primary metrics for Regression task. - public readonly partial struct RegressionPrimaryMetric : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RegressionPrimaryMetric(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SpearmanCorrelationValue = "SpearmanCorrelation"; - private const string NormalizedRootMeanSquaredErrorValue = "NormalizedRootMeanSquaredError"; - private const string R2ScoreValue = "R2Score"; - private const string NormalizedMeanAbsoluteErrorValue = "NormalizedMeanAbsoluteError"; - - /// The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation. - public static RegressionPrimaryMetric SpearmanCorrelation { get; } = new RegressionPrimaryMetric(SpearmanCorrelationValue); - /// The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales. - public static RegressionPrimaryMetric NormalizedRootMeanSquaredError { get; } = new RegressionPrimaryMetric(NormalizedRootMeanSquaredErrorValue); - /// The R2 score is one of the performance evaluation measures for forecasting-based machine learning models. - public static RegressionPrimaryMetric R2Score { get; } = new RegressionPrimaryMetric(R2ScoreValue); - /// The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales. - public static RegressionPrimaryMetric NormalizedMeanAbsoluteError { get; } = new RegressionPrimaryMetric(NormalizedMeanAbsoluteErrorValue); - /// Determines if two values are the same. - public static bool operator ==(RegressionPrimaryMetric left, RegressionPrimaryMetric right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RegressionPrimaryMetric left, RegressionPrimaryMetric right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RegressionPrimaryMetric(string value) => new RegressionPrimaryMetric(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RegressionPrimaryMetric other && Equals(other); - /// - public bool Equals(RegressionPrimaryMetric other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} 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 096f299d777b..dd7aa84eed73 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 @@ -51,30 +51,30 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("blockedTrainingAlgorithms"); } } - if (Optional.IsDefined(EnableDnnTraining)) + if (Optional.IsDefined(IsDnnTrainingEnabled)) { writer.WritePropertyName("enableDnnTraining"); - writer.WriteBooleanValue(EnableDnnTraining.Value); + writer.WriteBooleanValue(IsDnnTrainingEnabled.Value); } - if (Optional.IsDefined(EnableModelExplainability)) + if (Optional.IsDefined(IsModelExplainabilityEnabled)) { writer.WritePropertyName("enableModelExplainability"); - writer.WriteBooleanValue(EnableModelExplainability.Value); + writer.WriteBooleanValue(IsModelExplainabilityEnabled.Value); } - if (Optional.IsDefined(EnableOnnxCompatibleModels)) + if (Optional.IsDefined(IsOnnxCompatibleModelsEnabled)) { writer.WritePropertyName("enableOnnxCompatibleModels"); - writer.WriteBooleanValue(EnableOnnxCompatibleModels.Value); + writer.WriteBooleanValue(IsOnnxCompatibleModelsEnabled.Value); } - if (Optional.IsDefined(EnableStackEnsemble)) + if (Optional.IsDefined(IsStackEnsembleEnabled)) { writer.WritePropertyName("enableStackEnsemble"); - writer.WriteBooleanValue(EnableStackEnsemble.Value); + writer.WriteBooleanValue(IsStackEnsembleEnabled.Value); } - if (Optional.IsDefined(EnableVoteEnsemble)) + if (Optional.IsDefined(IsVoteEnsembleEnabled)) { writer.WritePropertyName("enableVoteEnsemble"); - writer.WriteBooleanValue(EnableVoteEnsemble.Value); + writer.WriteBooleanValue(IsVoteEnsembleEnabled.Value); } if (Optional.IsDefined(EnsembleModelDownloadTimeout)) { @@ -98,15 +98,15 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings(JsonElement element) { - Optional> allowedTrainingAlgorithms = default; - Optional> blockedTrainingAlgorithms = default; + Optional> allowedTrainingAlgorithms = default; + Optional> blockedTrainingAlgorithms = default; Optional enableDnnTraining = default; Optional enableModelExplainability = default; Optional enableOnnxCompatibleModels = default; Optional enableStackEnsemble = default; Optional enableVoteEnsemble = default; Optional ensembleModelDownloadTimeout = default; - Optional stackEnsembleSettings = default; + Optional stackEnsembleSettings = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("allowedTrainingAlgorithms")) @@ -116,10 +116,10 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings allowedTrainingAlgorithms = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new RegressionModel(item.GetString())); + array.Add(new AutoMLVerticalRegressionModel(item.GetString())); } allowedTrainingAlgorithms = array; continue; @@ -131,10 +131,10 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings blockedTrainingAlgorithms = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new RegressionModel(item.GetString())); + array.Add(new AutoMLVerticalRegressionModel(item.GetString())); } blockedTrainingAlgorithms = array; continue; @@ -206,7 +206,7 @@ internal static RegressionTrainingSettings DeserializeRegressionTrainingSettings stackEnsembleSettings = null; continue; } - stackEnsembleSettings = StackEnsembleSettings.DeserializeStackEnsembleSettings(property.Value); + stackEnsembleSettings = MachineLearningStackEnsembleSettings.DeserializeMachineLearningStackEnsembleSettings(property.Value); continue; } } 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 cd92c0e12844..66eff4bb1df4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RegressionTrainingSettings.cs @@ -11,38 +11,72 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Regression Training related configuration. - public partial class RegressionTrainingSettings : TrainingSettings + /// + /// Regression Training related configuration. + /// Serialized Name: RegressionTrainingSettings + /// + public partial class RegressionTrainingSettings : MachineLearningTrainingSettings { /// Initializes a new instance of RegressionTrainingSettings. public RegressionTrainingSettings() { - AllowedTrainingAlgorithms = new ChangeTrackingList(); - BlockedTrainingAlgorithms = new ChangeTrackingList(); + AllowedTrainingAlgorithms = new ChangeTrackingList(); + BlockedTrainingAlgorithms = new ChangeTrackingList(); } /// Initializes a new instance of RegressionTrainingSettings. - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. - /// Flag for enabling onnx compatible models. - /// Enable stack ensemble run. - /// Enable voting ensemble run. + /// + /// Enable recommendation of DNN models. + /// Serialized Name: TrainingSettings.enableDnnTraining + /// + /// + /// Flag to turn on explainability on best model. + /// Serialized Name: TrainingSettings.enableModelExplainability + /// + /// + /// Flag for enabling onnx compatible models. + /// Serialized Name: TrainingSettings.enableOnnxCompatibleModels + /// + /// + /// Enable stack ensemble run. + /// Serialized Name: TrainingSettings.enableStackEnsemble + /// + /// + /// Enable voting ensemble run. + /// Serialized Name: TrainingSettings.enableVoteEnsemble + /// /// /// 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. + /// Serialized Name: TrainingSettings.ensembleModelDownloadTimeout + /// + /// + /// Stack ensemble settings for stack ensemble run. + /// Serialized Name: TrainingSettings.stackEnsembleSettings + /// + /// + /// Allowed models for regression task. + /// Serialized Name: RegressionTrainingSettings.allowedTrainingAlgorithms + /// + /// + /// Blocked models for regression task. + /// Serialized Name: RegressionTrainingSettings.blockedTrainingAlgorithms /// - /// Stack ensemble settings for stack ensemble run. - /// Allowed models for regression task. - /// Blocked models for regression task. - internal RegressionTrainingSettings(bool? enableDnnTraining, bool? enableModelExplainability, bool? enableOnnxCompatibleModels, bool? enableStackEnsemble, bool? enableVoteEnsemble, TimeSpan? ensembleModelDownloadTimeout, StackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(enableDnnTraining, enableModelExplainability, enableOnnxCompatibleModels, enableStackEnsemble, enableVoteEnsemble, ensembleModelDownloadTimeout, stackEnsembleSettings) + internal RegressionTrainingSettings(bool? isDnnTrainingEnabled, bool? isModelExplainabilityEnabled, bool? isOnnxCompatibleModelsEnabled, bool? isStackEnsembleEnabled, bool? isVoteEnsembleEnabled, TimeSpan? ensembleModelDownloadTimeout, MachineLearningStackEnsembleSettings stackEnsembleSettings, IList allowedTrainingAlgorithms, IList blockedTrainingAlgorithms) : base(isDnnTrainingEnabled, isModelExplainabilityEnabled, isOnnxCompatibleModelsEnabled, isStackEnsembleEnabled, isVoteEnsembleEnabled, ensembleModelDownloadTimeout, stackEnsembleSettings) { AllowedTrainingAlgorithms = allowedTrainingAlgorithms; BlockedTrainingAlgorithms = blockedTrainingAlgorithms; } - /// Allowed models for regression task. - public IList AllowedTrainingAlgorithms { get; set; } - /// Blocked models for regression task. - public IList BlockedTrainingAlgorithms { get; set; } + /// + /// Allowed models for regression task. + /// Serialized Name: RegressionTrainingSettings.allowedTrainingAlgorithms + /// + public IList AllowedTrainingAlgorithms { get; set; } + /// + /// Blocked models for regression task. + /// Serialized Name: RegressionTrainingSettings.blockedTrainingAlgorithms + /// + public IList BlockedTrainingAlgorithms { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RemoteLoginPortPublicAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RemoteLoginPortPublicAccess.cs deleted file mode 100644 index 4266c8463ddc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/RemoteLoginPortPublicAccess.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 -{ - /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled. - public readonly partial struct RemoteLoginPortPublicAccess : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RemoteLoginPortPublicAccess(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - private const string NotSpecifiedValue = "NotSpecified"; - - /// Enabled. - public static RemoteLoginPortPublicAccess Enabled { get; } = new RemoteLoginPortPublicAccess(EnabledValue); - /// Disabled. - public static RemoteLoginPortPublicAccess Disabled { get; } = new RemoteLoginPortPublicAccess(DisabledValue); - /// NotSpecified. - public static RemoteLoginPortPublicAccess NotSpecified { get; } = new RemoteLoginPortPublicAccess(NotSpecifiedValue); - /// Determines if two values are the same. - public static bool operator ==(RemoteLoginPortPublicAccess left, RemoteLoginPortPublicAccess right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RemoteLoginPortPublicAccess left, RemoteLoginPortPublicAccess right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator RemoteLoginPortPublicAccess(string value) => new RemoteLoginPortPublicAccess(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RemoteLoginPortPublicAccess other && Equals(other); - /// - public bool Equals(RemoteLoginPortPublicAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceBase.Serialization.cs deleted file mode 100644 index f805cf4d3b3d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceBase.Serialization.cs +++ /dev/null @@ -1,135 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ResourceBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static ResourceBase DeserializeResourceBase(JsonElement element) - { - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new ResourceBase(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceBase.cs deleted file mode 100644 index 9cf972ff8bee..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceBase.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ResourceBase. - public partial class ResourceBase - { - /// Initializes a new instance of ResourceBase. - public ResourceBase() - { - Properties = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ResourceBase. - /// The asset description text. - /// The asset property dictionary. - /// Tag dictionary. Tags can be added, removed, and updated. - internal ResourceBase(string description, IDictionary properties, IDictionary tags) - { - Description = description; - Properties = properties; - Tags = tags; - } - - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceConfiguration.Serialization.cs deleted file mode 100644 index 7ad2d6ce8877..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceConfiguration.Serialization.cs +++ /dev/null @@ -1,108 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ResourceConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(InstanceCount)) - { - writer.WritePropertyName("instanceCount"); - writer.WriteNumberValue(InstanceCount.Value); - } - if (Optional.IsDefined(InstanceType)) - { - if (InstanceType != null) - { - writer.WritePropertyName("instanceType"); - writer.WriteStringValue(InstanceType); - } - else - { - writer.WriteNull("instanceType"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); -#endif - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("properties"); - } - } - writer.WriteEndObject(); - } - - internal static ResourceConfiguration DeserializeResourceConfiguration(JsonElement element) - { - Optional instanceCount = default; - Optional instanceType = default; - Optional> properties = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("instanceCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - instanceCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("instanceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instanceType = null; - continue; - } - instanceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = null; - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); - } - properties = dictionary; - continue; - } - } - return new ResourceConfiguration(Optional.ToNullable(instanceCount), instanceType.Value, Optional.ToDictionary(properties)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceConfiguration.cs deleted file mode 100644 index 57ecd348e2bc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceConfiguration.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; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ResourceConfiguration. - public partial class ResourceConfiguration - { - /// Initializes a new instance of ResourceConfiguration. - public ResourceConfiguration() - { - Properties = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of ResourceConfiguration. - /// Optional number of instances or nodes used by the compute target. - /// Optional type of VM used as supported by the compute target. - /// Additional properties bag. - internal ResourceConfiguration(int? instanceCount, string instanceType, IDictionary properties) - { - InstanceCount = instanceCount; - InstanceType = instanceType; - Properties = properties; - } - - /// Optional number of instances or nodes used by the compute target. - public int? InstanceCount { get; set; } - /// Optional type of VM used as supported by the compute target. - public string InstanceType { get; set; } - /// - /// Additional properties bag. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formated 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 Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceId.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceId.cs index 8eaf8543993d..81acf1d3a355 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceId.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceId.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + /// + /// Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. + /// Serialized Name: ResourceId + /// internal partial class ResourceId { /// Initializes a new instance of ResourceId. - /// The ID of the resource. + /// + /// The ID of the resource + /// Serialized Name: ResourceId.id + /// /// is null. public ResourceId(string id) { @@ -23,7 +29,10 @@ public ResourceId(string id) Id = id; } - /// The ID of the resource. + /// + /// The ID of the resource + /// Serialized Name: ResourceId.id + /// public string Id { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceName.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceName.Serialization.cs deleted file mode 100644 index a3dc1e1aa0ca..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceName.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ResourceName - { - internal static ResourceName DeserializeResourceName(JsonElement element) - { - Optional value = default; - Optional localizedValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("localizedValue")) - { - localizedValue = property.Value.GetString(); - continue; - } - } - return new ResourceName(value.Value, localizedValue.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceName.cs deleted file mode 100644 index c665ed379708..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceName.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The Resource Name. - public partial class ResourceName - { - /// Initializes a new instance of ResourceName. - internal ResourceName() - { - } - - /// Initializes a new instance of ResourceName. - /// The name of the resource. - /// The localized name of the resource. - internal ResourceName(string value, string localizedValue) - { - Value = value; - LocalizedValue = localizedValue; - } - - /// The name of the resource. - public string Value { get; } - /// The localized name of the resource. - public string LocalizedValue { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceQuota.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceQuota.Serialization.cs deleted file mode 100644 index d9c288845544..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceQuota.Serialization.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ResourceQuota - { - internal static ResourceQuota DeserializeResourceQuota(JsonElement element) - { - Optional id = default; - Optional amlWorkspaceLocation = default; - Optional type = default; - Optional name = default; - Optional limit = default; - Optional unit = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("amlWorkspaceLocation")) - { - amlWorkspaceLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("name")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - name = ResourceName.DeserializeResourceName(property.Value); - continue; - } - if (property.NameEquals("limit")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - limit = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("unit")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - unit = new QuotaUnit(property.Value.GetString()); - continue; - } - } - return new ResourceQuota(id.Value, amlWorkspaceLocation.Value, type.Value, name.Value, Optional.ToNullable(limit), Optional.ToNullable(unit)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceQuota.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceQuota.cs deleted file mode 100644 index 8af48c95b759..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ResourceQuota.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The quota assigned to a resource. - public partial class ResourceQuota - { - /// Initializes a new instance of ResourceQuota. - internal ResourceQuota() - { - } - - /// Initializes a new instance of ResourceQuota. - /// 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. - internal ResourceQuota(string id, string amlWorkspaceLocation, string resourceQuotaType, ResourceName name, long? limit, QuotaUnit? unit) - { - Id = id; - AmlWorkspaceLocation = amlWorkspaceLocation; - ResourceQuotaType = resourceQuotaType; - Name = name; - Limit = limit; - Unit = unit; - } - - /// Specifies the resource ID. - public string Id { get; } - /// Region of the AML workspace in the id. - public string AmlWorkspaceLocation { get; } - /// Specifies the resource type. - public string ResourceQuotaType { get; } - /// Name of the resource. - public ResourceName Name { get; } - /// The maximum permitted quota of the resource. - public long? Limit { get; } - /// An enum describing the unit of quota measurement. - public QuotaUnit? Unit { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Route.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Route.Serialization.cs deleted file mode 100644 index cf18a25776fc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Route.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Route : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("path"); - writer.WriteStringValue(Path); - writer.WritePropertyName("port"); - writer.WriteNumberValue(Port); - writer.WriteEndObject(); - } - - internal static Route DeserializeRoute(JsonElement element) - { - string path = default; - int port = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("path")) - { - path = property.Value.GetString(); - continue; - } - if (property.NameEquals("port")) - { - port = property.Value.GetInt32(); - continue; - } - } - return new Route(path, port); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Route.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Route.cs deleted file mode 100644 index fe33d7f37392..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Route.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The Route. - public partial class Route - { - /// Initializes a new instance of Route. - /// [Required] The path for the route. - /// [Required] The port for the route. - /// is null. - public Route(string path, int port) - { - Argument.AssertNotNull(path, nameof(path)); - - Path = path; - Port = port; - } - - /// [Required] The path for the route. - public string Path { get; set; } - /// [Required] The port for the route. - public int Port { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SASAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SASAuthTypeWorkspaceConnectionProperties.Serialization.cs deleted file mode 100644 index 5fbb5e241544..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SASAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SASAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Credentials)) - { - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - } - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType.ToString()); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category.Value.ToString()); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - if (Optional.IsDefined(ValueFormat)) - { - writer.WritePropertyName("valueFormat"); - writer.WriteStringValue(ValueFormat.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static SASAuthTypeWorkspaceConnectionProperties DeserializeSASAuthTypeWorkspaceConnectionProperties(JsonElement element) - { - Optional credentials = default; - ConnectionAuthType authType = default; - Optional category = default; - Optional target = default; - Optional value = default; - Optional valueFormat = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - credentials = WorkspaceConnectionSharedAccessSignature.DeserializeWorkspaceConnectionSharedAccessSignature(property.Value); - continue; - } - if (property.NameEquals("authType")) - { - authType = new ConnectionAuthType(property.Value.GetString()); - continue; - } - if (property.NameEquals("category")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - category = new ConnectionCategory(property.Value.GetString()); - continue; - } - if (property.NameEquals("target")) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueFormat")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - valueFormat = new ValueFormat(property.Value.GetString()); - continue; - } - } - return new SASAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SASAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SASAuthTypeWorkspaceConnectionProperties.cs deleted file mode 100644 index 90f813f4b90b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SASAuthTypeWorkspaceConnectionProperties.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The SASAuthTypeWorkspaceConnectionProperties. - public partial class SASAuthTypeWorkspaceConnectionProperties : WorkspaceConnectionPropertiesV2 - { - /// Initializes a new instance of SASAuthTypeWorkspaceConnectionProperties. - public SASAuthTypeWorkspaceConnectionProperties() - { - AuthType = ConnectionAuthType.SAS; - } - - /// Initializes a new instance of SASAuthTypeWorkspaceConnectionProperties. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - /// - internal SASAuthTypeWorkspaceConnectionProperties(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat, WorkspaceConnectionSharedAccessSignature credentials) : base(authType, category, target, value, valueFormat) - { - Credentials = credentials; - AuthType = authType; - } - - /// Gets or sets the credentials. - internal WorkspaceConnectionSharedAccessSignature Credentials { get; set; } - /// Gets or sets the sas. - public string CredentialsSas - { - get => Credentials is null ? default : Credentials.Sas; - set - { - if (Credentials is null) - Credentials = new WorkspaceConnectionSharedAccessSignature(); - Credentials.Sas = value; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithm.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithm.cs index 4c91fbdfe304..015644e67ce9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithm.cs @@ -10,6 +10,7 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// The Sampling Algorithm used to generate hyperparameter values, along with properties to /// configure the algorithm + /// Serialized Name: SamplingAlgorithm /// Please note is the base class. According to the scenario, a derived class 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 . /// @@ -21,13 +22,19 @@ protected SamplingAlgorithm() } /// Initializes a new instance of SamplingAlgorithm. - /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. + /// + /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties + /// Serialized Name: SamplingAlgorithm.samplingAlgorithmType + /// internal SamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType) { SamplingAlgorithmType = samplingAlgorithmType; } - /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. + /// + /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties + /// Serialized Name: SamplingAlgorithm.samplingAlgorithmType + /// internal SamplingAlgorithmType SamplingAlgorithmType { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithmType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithmType.cs index ba18c1a750ca..6c3738cb4399 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithmType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SamplingAlgorithmType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The SamplingAlgorithmType. + /// + /// The SamplingAlgorithmType. + /// Serialized Name: SamplingAlgorithmType + /// public readonly partial struct SamplingAlgorithmType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public SamplingAlgorithmType(string value) private const string RandomValue = "Random"; private const string BayesianValue = "Bayesian"; - /// Grid. + /// + /// Grid + /// Serialized Name: SamplingAlgorithmType.Grid + /// public static SamplingAlgorithmType Grid { get; } = new SamplingAlgorithmType(GridValue); - /// Random. + /// + /// Random + /// Serialized Name: SamplingAlgorithmType.Random + /// public static SamplingAlgorithmType Random { get; } = new SamplingAlgorithmType(RandomValue); - /// Bayesian. + /// + /// Bayesian + /// Serialized Name: SamplingAlgorithmType.Bayesian + /// public static SamplingAlgorithmType Bayesian { get; } = new SamplingAlgorithmType(BayesianValue); /// Determines if two values are the same. public static bool operator ==(SamplingAlgorithmType left, SamplingAlgorithmType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreCredentials.Serialization.cs deleted file mode 100644 index aed91070c863..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SasDatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("secrets"); - writer.WriteObjectValue(Secrets); - writer.WritePropertyName("credentialsType"); - writer.WriteStringValue(CredentialsType.ToString()); - writer.WriteEndObject(); - } - - internal static SasDatastoreCredentials DeserializeSasDatastoreCredentials(JsonElement element) - { - SasDatastoreSecrets secrets = default; - CredentialsType credentialsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("secrets")) - { - secrets = SasDatastoreSecrets.DeserializeSasDatastoreSecrets(property.Value); - continue; - } - if (property.NameEquals("credentialsType")) - { - credentialsType = new CredentialsType(property.Value.GetString()); - continue; - } - } - return new SasDatastoreCredentials(credentialsType, secrets); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreCredentials.cs deleted file mode 100644 index 95c776bdd4fa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreCredentials.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// SAS datastore credentials configuration. - public partial class SasDatastoreCredentials : DatastoreCredentials - { - /// Initializes a new instance of SasDatastoreCredentials. - /// [Required] Storage container secrets. - /// is null. - public SasDatastoreCredentials(SasDatastoreSecrets secrets) - { - Argument.AssertNotNull(secrets, nameof(secrets)); - - Secrets = secrets; - CredentialsType = CredentialsType.Sas; - } - - /// Initializes a new instance of SasDatastoreCredentials. - /// [Required] Credential type used to authentication with storage. - /// [Required] Storage container secrets. - internal SasDatastoreCredentials(CredentialsType credentialsType, SasDatastoreSecrets secrets) : base(credentialsType) - { - Secrets = secrets; - CredentialsType = credentialsType; - } - - /// [Required] Storage container secrets. - public SasDatastoreSecrets Secrets { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreSecrets.Serialization.cs deleted file mode 100644 index 95a31bb01344..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreSecrets.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SasDatastoreSecrets : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(SasToken)) - { - if (SasToken != null) - { - writer.WritePropertyName("sasToken"); - writer.WriteStringValue(SasToken); - } - else - { - writer.WriteNull("sasToken"); - } - } - writer.WritePropertyName("secretsType"); - writer.WriteStringValue(SecretsType.ToString()); - writer.WriteEndObject(); - } - - internal static SasDatastoreSecrets DeserializeSasDatastoreSecrets(JsonElement element) - { - Optional sasToken = default; - SecretsType secretsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sasToken")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - sasToken = null; - continue; - } - sasToken = property.Value.GetString(); - continue; - } - if (property.NameEquals("secretsType")) - { - secretsType = new SecretsType(property.Value.GetString()); - continue; - } - } - return new SasDatastoreSecrets(secretsType, sasToken.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreSecrets.cs deleted file mode 100644 index e5946e07f0e4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SasDatastoreSecrets.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Datastore SAS secrets. - public partial class SasDatastoreSecrets : DatastoreSecrets - { - /// Initializes a new instance of SasDatastoreSecrets. - public SasDatastoreSecrets() - { - SecretsType = SecretsType.Sas; - } - - /// Initializes a new instance of SasDatastoreSecrets. - /// [Required] Credential type used to authentication with storage. - /// Storage container SAS token. - internal SasDatastoreSecrets(SecretsType secretsType, string sasToken) : base(secretsType) - { - SasToken = sasToken; - SecretsType = secretsType; - } - - /// Storage container SAS token. - public string SasToken { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettings.Serialization.cs deleted file mode 100644 index d97791f5adf4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettings.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ScaleSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("maxNodeCount"); - writer.WriteNumberValue(MaxNodeCount); - if (Optional.IsDefined(MinNodeCount)) - { - writer.WritePropertyName("minNodeCount"); - writer.WriteNumberValue(MinNodeCount.Value); - } - if (Optional.IsDefined(NodeIdleTimeBeforeScaleDown)) - { - if (NodeIdleTimeBeforeScaleDown != null) - { - writer.WritePropertyName("nodeIdleTimeBeforeScaleDown"); - writer.WriteStringValue(NodeIdleTimeBeforeScaleDown.Value, "P"); - } - else - { - writer.WriteNull("nodeIdleTimeBeforeScaleDown"); - } - } - writer.WriteEndObject(); - } - - internal static ScaleSettings DeserializeScaleSettings(JsonElement element) - { - int maxNodeCount = default; - Optional minNodeCount = default; - Optional nodeIdleTimeBeforeScaleDown = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxNodeCount")) - { - maxNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("minNodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minNodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("nodeIdleTimeBeforeScaleDown")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - nodeIdleTimeBeforeScaleDown = null; - continue; - } - nodeIdleTimeBeforeScaleDown = property.Value.GetTimeSpan("P"); - continue; - } - } - return new ScaleSettings(maxNodeCount, Optional.ToNullable(minNodeCount), Optional.ToNullable(nodeIdleTimeBeforeScaleDown)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettings.cs deleted file mode 100644 index 245a0a48d28f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettings.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// scale settings for AML Compute. - public partial class ScaleSettings - { - /// Initializes a new instance of ScaleSettings. - /// Max number of nodes to use. - public ScaleSettings(int maxNodeCount) - { - MaxNodeCount = maxNodeCount; - } - - /// Initializes a new instance of ScaleSettings. - /// Max number of nodes to use. - /// Min number of nodes to use. - /// Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. - internal ScaleSettings(int maxNodeCount, int? minNodeCount, TimeSpan? nodeIdleTimeBeforeScaleDown) - { - MaxNodeCount = maxNodeCount; - MinNodeCount = minNodeCount; - NodeIdleTimeBeforeScaleDown = nodeIdleTimeBeforeScaleDown; - } - - /// Max number of nodes to use. - public int MaxNodeCount { get; set; } - /// Min number of nodes to use. - public int? MinNodeCount { get; set; } - /// Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format. - public TimeSpan? NodeIdleTimeBeforeScaleDown { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettingsInformation.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettingsInformation.cs index 10919eb997d5..1b6ea6429101 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettingsInformation.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleSettingsInformation.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Desired scale settings for the amlCompute. + /// + /// Desired scale settings for the amlCompute. + /// Serialized Name: ScaleSettingsInformation + /// internal partial class ScaleSettingsInformation { /// Initializes a new instance of ScaleSettingsInformation. @@ -15,7 +18,10 @@ public ScaleSettingsInformation() { } - /// scale settings for AML Compute. - public ScaleSettings ScaleSettings { get; set; } + /// + /// scale settings for AML Compute + /// Serialized Name: ScaleSettingsInformation.scaleSettings + /// + public AmlComputeScaleSettings ScaleSettings { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleType.cs index dc3566e0696c..eba34b4885af 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScaleType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ScaleType. + /// + /// The ScaleType. + /// Serialized Name: ScaleType + /// internal readonly partial struct ScaleType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public ScaleType(string value) private const string DefaultValue = "Default"; private const string TargetUtilizationValue = "TargetUtilization"; - /// Default. + /// + /// Default + /// Serialized Name: ScaleType.Default + /// public static ScaleType Default { get; } = new ScaleType(DefaultValue); - /// TargetUtilization. + /// + /// TargetUtilization + /// Serialized Name: ScaleType.TargetUtilization + /// public static ScaleType TargetUtilization { get; } = new ScaleType(TargetUtilizationValue); /// Determines if two values are the same. public static bool operator ==(ScaleType left, ScaleType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionBase.Serialization.cs deleted file mode 100644 index 0f50e5a4ce45..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionBase.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ScheduleActionBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("actionType"); - writer.WriteStringValue(ActionType.ToString()); - writer.WriteEndObject(); - } - - internal static ScheduleActionBase DeserializeScheduleActionBase(JsonElement element) - { - if (element.TryGetProperty("actionType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "CreateJob": return JobScheduleAction.DeserializeJobScheduleAction(element); - case "InvokeBatchEndpoint": return EndpointScheduleAction.DeserializeEndpointScheduleAction(element); - } - } - return UnknownScheduleActionBase.DeserializeUnknownScheduleActionBase(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionBase.cs deleted file mode 100644 index 37219117e6f9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// The ScheduleActionBase. - /// Please note is the base class. According to the scenario, a derived class 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 ScheduleActionBase - { - /// Initializes a new instance of ScheduleActionBase. - protected ScheduleActionBase() - { - } - - /// Initializes a new instance of ScheduleActionBase. - /// [Required] Specifies the action type of the schedule. - internal ScheduleActionBase(ScheduleActionType actionType) - { - ActionType = actionType; - } - - /// [Required] Specifies the action type of the schedule. - internal ScheduleActionType ActionType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs index 0b2403a6e195..f6859401a730 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleActionType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ScheduleActionType. + /// + /// The ScheduleActionType. + /// Serialized Name: ScheduleActionType + /// internal readonly partial struct ScheduleActionType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public ScheduleActionType(string value) private const string CreateJobValue = "CreateJob"; private const string InvokeBatchEndpointValue = "InvokeBatchEndpoint"; - /// CreateJob. + /// + /// CreateJob + /// Serialized Name: ScheduleActionType.CreateJob + /// public static ScheduleActionType CreateJob { get; } = new ScheduleActionType(CreateJobValue); - /// InvokeBatchEndpoint. + /// + /// InvokeBatchEndpoint + /// Serialized Name: ScheduleActionType.InvokeBatchEndpoint + /// public static ScheduleActionType InvokeBatchEndpoint { get; } = new ScheduleActionType(InvokeBatchEndpointValue); /// Determines if two values are the same. public static bool operator ==(ScheduleActionType left, ScheduleActionType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleBase.Serialization.cs deleted file mode 100644 index 9ad2e2095aed..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleBase.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ScheduleBase - { - internal static ScheduleBase DeserializeScheduleBase(JsonElement element) - { - Optional id = default; - Optional provisioningStatus = default; - Optional status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - id = null; - continue; - } - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningStatus")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningStatus = new ScheduleProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new ScheduleStatus(property.Value.GetString()); - continue; - } - } - return new ScheduleBase(id.Value, Optional.ToNullable(provisioningStatus), Optional.ToNullable(status)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleBase.cs deleted file mode 100644 index 8eaa697fc020..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleBase.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ScheduleBase. - public partial class ScheduleBase - { - /// Initializes a new instance of ScheduleBase. - internal ScheduleBase() - { - } - - /// Initializes a new instance of ScheduleBase. - /// A system assigned id for the schedule. - /// The current deployment state of schedule. - /// Is the schedule enabled or disabled?. - internal ScheduleBase(string id, ScheduleProvisioningState? provisioningStatus, ScheduleStatus? status) - { - Id = id; - ProvisioningStatus = provisioningStatus; - Status = status; - } - - /// A system assigned id for the schedule. - public string Id { get; } - /// The current deployment state of schedule. - public ScheduleProvisioningState? ProvisioningStatus { get; } - /// Is the schedule enabled or disabled?. - public ScheduleStatus? Status { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleData.Serialization.cs deleted file mode 100644 index 4b063605a038..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class ScheduleData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static ScheduleData DeserializeScheduleData(JsonElement element) - { - ScheduleProperties properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = ScheduleProperties.DeserializeScheduleProperties(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new ScheduleData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleListViewType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleListViewType.cs deleted file mode 100644 index f9b74e87679b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleListViewType.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 ScheduleListViewType. - public readonly partial struct ScheduleListViewType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScheduleListViewType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledOnlyValue = "EnabledOnly"; - private const string DisabledOnlyValue = "DisabledOnly"; - private const string AllValue = "All"; - - /// EnabledOnly. - public static ScheduleListViewType EnabledOnly { get; } = new ScheduleListViewType(EnabledOnlyValue); - /// DisabledOnly. - public static ScheduleListViewType DisabledOnly { get; } = new ScheduleListViewType(DisabledOnlyValue); - /// All. - public static ScheduleListViewType All { get; } = new ScheduleListViewType(AllValue); - /// Determines if two values are the same. - public static bool operator ==(ScheduleListViewType left, ScheduleListViewType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScheduleListViewType left, ScheduleListViewType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScheduleListViewType(string value) => new ScheduleListViewType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScheduleListViewType other && Equals(other); - /// - public bool Equals(ScheduleListViewType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProperties.Serialization.cs deleted file mode 100644 index c8fea98a3067..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProperties.Serialization.cs +++ /dev/null @@ -1,201 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ScheduleProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("action"); - writer.WriteObjectValue(Action); - if (Optional.IsDefined(DisplayName)) - { - if (DisplayName != null) - { - writer.WritePropertyName("displayName"); - writer.WriteStringValue(DisplayName); - } - else - { - writer.WriteNull("displayName"); - } - } - if (Optional.IsDefined(IsEnabled)) - { - writer.WritePropertyName("isEnabled"); - writer.WriteBooleanValue(IsEnabled.Value); - } - writer.WritePropertyName("trigger"); - writer.WriteObjectValue(Trigger); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static ScheduleProperties DeserializeScheduleProperties(JsonElement element) - { - ScheduleActionBase action = default; - Optional displayName = default; - Optional isEnabled = default; - Optional provisioningState = default; - TriggerBase trigger = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("action")) - { - action = ScheduleActionBase.DeserializeScheduleActionBase(property.Value); - continue; - } - if (property.NameEquals("displayName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - displayName = null; - continue; - } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("isEnabled")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isEnabled = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ScheduleProvisioningStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("trigger")) - { - trigger = TriggerBase.DeserializeTriggerBase(property.Value); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new ScheduleProperties(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), action, displayName.Value, Optional.ToNullable(isEnabled), Optional.ToNullable(provisioningState), trigger); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProperties.cs deleted file mode 100644 index ad124be08361..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProperties.cs +++ /dev/null @@ -1,83 +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 -{ - /// Base definition of a schedule. - public partial class ScheduleProperties : ResourceBase - { - /// Initializes a new instance of ScheduleProperties. - /// - /// [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 ScheduleProperties(ScheduleActionBase action, TriggerBase trigger) - { - Argument.AssertNotNull(action, nameof(action)); - Argument.AssertNotNull(trigger, nameof(trigger)); - - Action = action; - Trigger = trigger; - } - - /// Initializes a new instance of ScheduleProperties. - /// 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 . - /// - internal ScheduleProperties(string description, IDictionary properties, IDictionary tags, ScheduleActionBase action, string displayName, bool? isEnabled, ScheduleProvisioningStatus? provisioningState, TriggerBase trigger) : base(description, properties, tags) - { - Action = action; - DisplayName = displayName; - IsEnabled = isEnabled; - ProvisioningState = provisioningState; - Trigger = 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 . - /// - public ScheduleActionBase 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 ScheduleProvisioningStatus? 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 TriggerBase Trigger { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProvisioningState.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProvisioningState.cs deleted file mode 100644 index 82561945e03e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProvisioningState.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 current deployment state of schedule. - public readonly partial struct ScheduleProvisioningState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScheduleProvisioningState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CompletedValue = "Completed"; - private const string ProvisioningValue = "Provisioning"; - private const string FailedValue = "Failed"; - - /// Completed. - public static ScheduleProvisioningState Completed { get; } = new ScheduleProvisioningState(CompletedValue); - /// Provisioning. - public static ScheduleProvisioningState Provisioning { get; } = new ScheduleProvisioningState(ProvisioningValue); - /// Failed. - public static ScheduleProvisioningState Failed { get; } = new ScheduleProvisioningState(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(ScheduleProvisioningState left, ScheduleProvisioningState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScheduleProvisioningState left, ScheduleProvisioningState right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScheduleProvisioningState(string value) => new ScheduleProvisioningState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScheduleProvisioningState other && Equals(other); - /// - public bool Equals(ScheduleProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProvisioningStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProvisioningStatus.cs deleted file mode 100644 index 5c3699494e1d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleProvisioningStatus.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 -{ - /// The ScheduleProvisioningStatus. - public readonly partial struct ScheduleProvisioningStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScheduleProvisioningStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CreatingValue = "Creating"; - private const string UpdatingValue = "Updating"; - private const string DeletingValue = "Deleting"; - private const string SucceededValue = "Succeeded"; - private const string FailedValue = "Failed"; - private const string CanceledValue = "Canceled"; - - /// Creating. - public static ScheduleProvisioningStatus Creating { get; } = new ScheduleProvisioningStatus(CreatingValue); - /// Updating. - public static ScheduleProvisioningStatus Updating { get; } = new ScheduleProvisioningStatus(UpdatingValue); - /// Deleting. - public static ScheduleProvisioningStatus Deleting { get; } = new ScheduleProvisioningStatus(DeletingValue); - /// Succeeded. - public static ScheduleProvisioningStatus Succeeded { get; } = new ScheduleProvisioningStatus(SucceededValue); - /// Failed. - public static ScheduleProvisioningStatus Failed { get; } = new ScheduleProvisioningStatus(FailedValue); - /// Canceled. - public static ScheduleProvisioningStatus Canceled { get; } = new ScheduleProvisioningStatus(CanceledValue); - /// Determines if two values are the same. - public static bool operator ==(ScheduleProvisioningStatus left, ScheduleProvisioningStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScheduleProvisioningStatus left, ScheduleProvisioningStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScheduleProvisioningStatus(string value) => new ScheduleProvisioningStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScheduleProvisioningStatus other && Equals(other); - /// - public bool Equals(ScheduleProvisioningStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} 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 a9f514593774..cda6d8c3799d 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 @@ -17,7 +17,7 @@ internal partial class ScheduleResourceArmPaginatedResult internal static ScheduleResourceArmPaginatedResult DeserializeScheduleResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -32,10 +32,10 @@ internal static ScheduleResourceArmPaginatedResult DeserializeScheduleResourceAr property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ScheduleData.DeserializeScheduleData(item)); + array.Add(MachineLearningScheduleData.DeserializeMachineLearningScheduleData(item)); } value = array; continue; 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 77a7c5fe4a4e..a70d1bfd45f3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleResourceArmPaginatedResult.cs @@ -11,27 +11,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of Schedule entities. + /// + /// A paginated list of Schedule entities. + /// Serialized Name: ScheduleResourceArmPaginatedResult + /// internal partial class ScheduleResourceArmPaginatedResult { /// Initializes a new instance of ScheduleResourceArmPaginatedResult. internal ScheduleResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of ScheduleResourceArmPaginatedResult. - /// The link to the next page of Schedule objects. If null, there are no additional pages. - /// An array of objects of type Schedule. - internal ScheduleResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of Schedule objects. If null, there are no additional pages. + /// Serialized Name: ScheduleResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type Schedule. + /// Serialized Name: ScheduleResourceArmPaginatedResult.value + /// + internal ScheduleResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of Schedule objects. If null, there are no additional pages. + /// + /// The link to the next page of Schedule objects. If null, there are no additional pages. + /// Serialized Name: ScheduleResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type Schedule. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type Schedule. + /// Serialized Name: ScheduleResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleStatus.cs deleted file mode 100644 index 720e2b922428..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScheduleStatus.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 -{ - /// Is the schedule enabled or disabled?. - public readonly partial struct ScheduleStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ScheduleStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static ScheduleStatus Enabled { get; } = new ScheduleStatus(EnabledValue); - /// Disabled. - public static ScheduleStatus Disabled { get; } = new ScheduleStatus(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(ScheduleStatus left, ScheduleStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ScheduleStatus left, ScheduleStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ScheduleStatus(string value) => new ScheduleStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ScheduleStatus other && Equals(other); - /// - public bool Equals(ScheduleStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptReference.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptReference.Serialization.cs deleted file mode 100644 index 556ca59ff122..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptReference.Serialization.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ScriptReference : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ScriptSource)) - { - writer.WritePropertyName("scriptSource"); - writer.WriteStringValue(ScriptSource); - } - if (Optional.IsDefined(ScriptData)) - { - writer.WritePropertyName("scriptData"); - writer.WriteStringValue(ScriptData); - } - if (Optional.IsDefined(ScriptArguments)) - { - writer.WritePropertyName("scriptArguments"); - writer.WriteStringValue(ScriptArguments); - } - if (Optional.IsDefined(Timeout)) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(Timeout); - } - writer.WriteEndObject(); - } - - internal static ScriptReference DeserializeScriptReference(JsonElement element) - { - Optional scriptSource = default; - Optional scriptData = default; - Optional scriptArguments = default; - Optional timeout = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("scriptSource")) - { - scriptSource = property.Value.GetString(); - continue; - } - if (property.NameEquals("scriptData")) - { - scriptData = property.Value.GetString(); - continue; - } - if (property.NameEquals("scriptArguments")) - { - scriptArguments = property.Value.GetString(); - continue; - } - if (property.NameEquals("timeout")) - { - timeout = property.Value.GetString(); - continue; - } - } - return new ScriptReference(scriptSource.Value, scriptData.Value, scriptArguments.Value, timeout.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptReference.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptReference.cs deleted file mode 100644 index 89a41569fd2f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptReference.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Script reference. - public partial class ScriptReference - { - /// Initializes a new instance of ScriptReference. - public ScriptReference() - { - } - - /// Initializes a new instance of ScriptReference. - /// 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. - internal ScriptReference(string scriptSource, string scriptData, string scriptArguments, string timeout) - { - ScriptSource = scriptSource; - ScriptData = scriptData; - ScriptArguments = scriptArguments; - Timeout = timeout; - } - - /// 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; } - /// Optional command line arguments passed to the script to run. - public string ScriptArguments { get; set; } - /// Optional time period passed to timeout command. - public string Timeout { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptsToExecute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptsToExecute.Serialization.cs deleted file mode 100644 index 247c22f2d5c4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptsToExecute.Serialization.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ScriptsToExecute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StartupScript)) - { - writer.WritePropertyName("startupScript"); - writer.WriteObjectValue(StartupScript); - } - if (Optional.IsDefined(CreationScript)) - { - writer.WritePropertyName("creationScript"); - writer.WriteObjectValue(CreationScript); - } - writer.WriteEndObject(); - } - - internal static ScriptsToExecute DeserializeScriptsToExecute(JsonElement element) - { - Optional startupScript = default; - Optional creationScript = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("startupScript")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - startupScript = ScriptReference.DeserializeScriptReference(property.Value); - continue; - } - if (property.NameEquals("creationScript")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - creationScript = ScriptReference.DeserializeScriptReference(property.Value); - continue; - } - } - return new ScriptsToExecute(startupScript.Value, creationScript.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptsToExecute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptsToExecute.cs deleted file mode 100644 index 25133ae30911..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ScriptsToExecute.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Customized setup scripts. - public partial class ScriptsToExecute - { - /// Initializes a new instance of ScriptsToExecute. - public ScriptsToExecute() - { - } - - /// Initializes a new instance of ScriptsToExecute. - /// Script that's run every time the machine starts. - /// Script that's run only once during provision of the compute. - internal ScriptsToExecute(ScriptReference startupScript, ScriptReference creationScript) - { - StartupScript = startupScript; - CreationScript = creationScript; - } - - /// Script that's run every time the machine starts. - public ScriptReference StartupScript { get; set; } - /// Script that's run only once during provision of the compute. - public ScriptReference CreationScript { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Seasonality.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Seasonality.Serialization.cs deleted file mode 100644 index 22c7b65beef8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Seasonality.Serialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class Seasonality : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.ToString()); - writer.WriteEndObject(); - } - - internal static Seasonality DeserializeSeasonality(JsonElement element) - { - if (element.TryGetProperty("mode", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Auto": return AutoSeasonality.DeserializeAutoSeasonality(element); - case "Custom": return CustomSeasonality.DeserializeCustomSeasonality(element); - } - } - return UnknownSeasonality.DeserializeUnknownSeasonality(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Seasonality.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Seasonality.cs deleted file mode 100644 index d933d28edb1a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Seasonality.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// Forecasting seasonality. - /// Please note is the base class. According to the scenario, a derived class 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 Seasonality - { - /// Initializes a new instance of Seasonality. - protected Seasonality() - { - } - - /// Initializes a new instance of Seasonality. - /// [Required] Seasonality mode. - internal Seasonality(SeasonalityMode mode) - { - Mode = mode; - } - - /// [Required] Seasonality mode. - internal SeasonalityMode Mode { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SeasonalityMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SeasonalityMode.cs index fc6e58fbd6fa..807fff3e6430 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SeasonalityMode.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SeasonalityMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Forecasting seasonality mode. + /// + /// Forecasting seasonality mode. + /// Serialized Name: SeasonalityMode + /// internal readonly partial struct SeasonalityMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public SeasonalityMode(string value) private const string AutoValue = "Auto"; private const string CustomValue = "Custom"; - /// Seasonality to be determined automatically. + /// + /// Seasonality to be determined automatically. + /// Serialized Name: SeasonalityMode.Auto + /// public static SeasonalityMode Auto { get; } = new SeasonalityMode(AutoValue); - /// Use the custom seasonality value. + /// + /// Use the custom seasonality value. + /// Serialized Name: SeasonalityMode.Custom + /// public static SeasonalityMode Custom { get; } = new SeasonalityMode(CustomValue); /// Determines if two values are the same. public static bool operator ==(SeasonalityMode left, SeasonalityMode right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs index 091196b5382a..0304e7be69a2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SecretsType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Enum to determine the datastore secrets type. + /// + /// Enum to determine the datastore secrets type. + /// Serialized Name: SecretsType + /// internal readonly partial struct SecretsType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public SecretsType(string value) private const string SasValue = "Sas"; private const string ServicePrincipalValue = "ServicePrincipal"; - /// AccountKey. + /// + /// AccountKey + /// Serialized Name: SecretsType.AccountKey + /// public static SecretsType AccountKey { get; } = new SecretsType(AccountKeyValue); - /// Certificate. + /// + /// Certificate + /// Serialized Name: SecretsType.Certificate + /// public static SecretsType Certificate { get; } = new SecretsType(CertificateValue); - /// Sas. + /// + /// Sas + /// Serialized Name: SecretsType.Sas + /// public static SecretsType Sas { get; } = new SecretsType(SasValue); - /// ServicePrincipal. + /// + /// ServicePrincipal + /// Serialized Name: SecretsType.ServicePrincipal + /// public static SecretsType ServicePrincipal { get; } = new SecretsType(ServicePrincipalValue); /// Determines if two values are the same. public static bool operator ==(SecretsType left, SecretsType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceDataAccessAuthIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceDataAccessAuthIdentity.cs deleted file mode 100644 index 5328fcbdda81..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceDataAccessAuthIdentity.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 ServiceDataAccessAuthIdentity. - public readonly partial struct ServiceDataAccessAuthIdentity : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ServiceDataAccessAuthIdentity(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string WorkspaceSystemAssignedIdentityValue = "WorkspaceSystemAssignedIdentity"; - private const string WorkspaceUserAssignedIdentityValue = "WorkspaceUserAssignedIdentity"; - - /// Do not use any identity for service data access. - public static ServiceDataAccessAuthIdentity None { get; } = new ServiceDataAccessAuthIdentity(NoneValue); - /// Use the system assigned managed identity of the Workspace to authenticate service data access. - public static ServiceDataAccessAuthIdentity WorkspaceSystemAssignedIdentity { get; } = new ServiceDataAccessAuthIdentity(WorkspaceSystemAssignedIdentityValue); - /// Use the user assigned managed identity of the Workspace to authenticate service data access. - public static ServiceDataAccessAuthIdentity WorkspaceUserAssignedIdentity { get; } = new ServiceDataAccessAuthIdentity(WorkspaceUserAssignedIdentityValue); - /// Determines if two values are the same. - public static bool operator ==(ServiceDataAccessAuthIdentity left, ServiceDataAccessAuthIdentity right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ServiceDataAccessAuthIdentity left, ServiceDataAccessAuthIdentity right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ServiceDataAccessAuthIdentity(string value) => new ServiceDataAccessAuthIdentity(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ServiceDataAccessAuthIdentity other && Equals(other); - /// - public bool Equals(ServiceDataAccessAuthIdentity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 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 bf4439457c5b..2ba22f59e9e7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServiceManagedResourcesSettings.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The ServiceManagedResourcesSettings. + /// + /// The ServiceManagedResourcesSettings. + /// Serialized Name: ServiceManagedResourcesSettings + /// internal partial class ServiceManagedResourcesSettings { /// Initializes a new instance of ServiceManagedResourcesSettings. @@ -16,15 +19,24 @@ public ServiceManagedResourcesSettings() } /// Initializes a new instance of ServiceManagedResourcesSettings. - /// The settings for the service managed cosmosdb account. + /// + /// The settings for the service managed cosmosdb account. + /// Serialized Name: ServiceManagedResourcesSettings.cosmosDb + /// internal ServiceManagedResourcesSettings(CosmosDbSettings cosmosDb) { CosmosDb = cosmosDb; } - /// The settings for the service managed cosmosdb account. + /// + /// The settings for the service managed cosmosdb account. + /// Serialized Name: ServiceManagedResourcesSettings.cosmosDb + /// internal CosmosDbSettings CosmosDb { get; set; } - /// The throughput of the collections in cosmosdb database. + /// + /// The throughput of the collections in cosmosdb database + /// Serialized Name: CosmosDbSettings.collectionsThroughput + /// public int? CosmosDbCollectionsThroughput { get => CosmosDb is null ? default : CosmosDb.CollectionsThroughput; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreCredentials.Serialization.cs deleted file mode 100644 index b8370f6df17a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreCredentials.Serialization.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ServicePrincipalDatastoreCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AuthorityUri)) - { - if (AuthorityUri != null) - { - writer.WritePropertyName("authorityUrl"); - writer.WriteStringValue(AuthorityUri.AbsoluteUri); - } - else - { - writer.WriteNull("authorityUrl"); - } - } - writer.WritePropertyName("clientId"); - writer.WriteStringValue(ClientId); - if (Optional.IsDefined(ResourceUri)) - { - if (ResourceUri != null) - { - writer.WritePropertyName("resourceUrl"); - writer.WriteStringValue(ResourceUri.AbsoluteUri); - } - else - { - writer.WriteNull("resourceUrl"); - } - } - writer.WritePropertyName("secrets"); - writer.WriteObjectValue(Secrets); - writer.WritePropertyName("tenantId"); - writer.WriteStringValue(TenantId); - writer.WritePropertyName("credentialsType"); - writer.WriteStringValue(CredentialsType.ToString()); - writer.WriteEndObject(); - } - - internal static ServicePrincipalDatastoreCredentials DeserializeServicePrincipalDatastoreCredentials(JsonElement element) - { - Optional authorityUrl = default; - Guid clientId = default; - Optional resourceUrl = default; - ServicePrincipalDatastoreSecrets secrets = default; - Guid tenantId = default; - CredentialsType credentialsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authorityUrl")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - authorityUrl = null; - continue; - } - authorityUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("clientId")) - { - clientId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("resourceUrl")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceUrl = null; - continue; - } - resourceUrl = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("secrets")) - { - secrets = ServicePrincipalDatastoreSecrets.DeserializeServicePrincipalDatastoreSecrets(property.Value); - continue; - } - if (property.NameEquals("tenantId")) - { - tenantId = property.Value.GetGuid(); - continue; - } - if (property.NameEquals("credentialsType")) - { - credentialsType = new CredentialsType(property.Value.GetString()); - continue; - } - } - return new ServicePrincipalDatastoreCredentials(credentialsType, authorityUrl.Value, clientId, resourceUrl.Value, secrets, tenantId); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreCredentials.cs deleted file mode 100644 index ab66e8ebea40..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreCredentials.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Service Principal datastore credentials configuration. - public partial class ServicePrincipalDatastoreCredentials : DatastoreCredentials - { - /// Initializes a new instance of ServicePrincipalDatastoreCredentials. - /// [Required] Service principal client ID. - /// [Required] Service principal secrets. - /// [Required] ID of the tenant to which the service principal belongs. - /// is null. - public ServicePrincipalDatastoreCredentials(Guid clientId, ServicePrincipalDatastoreSecrets secrets, Guid tenantId) - { - Argument.AssertNotNull(secrets, nameof(secrets)); - - ClientId = clientId; - Secrets = secrets; - TenantId = tenantId; - CredentialsType = CredentialsType.ServicePrincipal; - } - - /// Initializes a new instance of ServicePrincipalDatastoreCredentials. - /// [Required] Credential type used to authentication with storage. - /// 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 ServicePrincipalDatastoreCredentials(CredentialsType credentialsType, Uri authorityUri, Guid clientId, Uri resourceUri, ServicePrincipalDatastoreSecrets secrets, Guid tenantId) : base(credentialsType) - { - AuthorityUri = authorityUri; - ClientId = clientId; - ResourceUri = resourceUri; - Secrets = secrets; - TenantId = tenantId; - CredentialsType = credentialsType; - } - - /// 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 ServicePrincipalDatastoreSecrets Secrets { get; set; } - /// [Required] ID of the tenant to which the service principal belongs. - public Guid TenantId { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreSecrets.Serialization.cs deleted file mode 100644 index d08723e3a909..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreSecrets.Serialization.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class ServicePrincipalDatastoreSecrets : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ClientSecret)) - { - if (ClientSecret != null) - { - writer.WritePropertyName("clientSecret"); - writer.WriteStringValue(ClientSecret); - } - else - { - writer.WriteNull("clientSecret"); - } - } - writer.WritePropertyName("secretsType"); - writer.WriteStringValue(SecretsType.ToString()); - writer.WriteEndObject(); - } - - internal static ServicePrincipalDatastoreSecrets DeserializeServicePrincipalDatastoreSecrets(JsonElement element) - { - Optional clientSecret = default; - SecretsType secretsType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("clientSecret")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - clientSecret = null; - continue; - } - clientSecret = property.Value.GetString(); - continue; - } - if (property.NameEquals("secretsType")) - { - secretsType = new SecretsType(property.Value.GetString()); - continue; - } - } - return new ServicePrincipalDatastoreSecrets(secretsType, clientSecret.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreSecrets.cs deleted file mode 100644 index 1a86bedabe8d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ServicePrincipalDatastoreSecrets.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Datastore Service Principal secrets. - public partial class ServicePrincipalDatastoreSecrets : DatastoreSecrets - { - /// Initializes a new instance of ServicePrincipalDatastoreSecrets. - public ServicePrincipalDatastoreSecrets() - { - SecretsType = SecretsType.ServicePrincipal; - } - - /// Initializes a new instance of ServicePrincipalDatastoreSecrets. - /// [Required] Credential type used to authentication with storage. - /// Service principal secret. - internal ServicePrincipalDatastoreSecrets(SecretsType secretsType, string clientSecret) : base(secretsType) - { - ClientSecret = clientSecret; - SecretsType = secretsType; - } - - /// Service principal secret. - public string ClientSecret { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.Serialization.cs index d5e078bc816b..2c07c0d8f1c2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.Serialization.cs @@ -25,7 +25,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static SetupScripts DeserializeSetupScripts(JsonElement element) { - Optional scripts = default; + Optional scripts = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("scripts")) @@ -35,7 +35,7 @@ internal static SetupScripts DeserializeSetupScripts(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - scripts = ScriptsToExecute.DeserializeScriptsToExecute(property.Value); + scripts = MachineLearningScriptsToExecute.DeserializeMachineLearningScriptsToExecute(property.Value); continue; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.cs index ad2f663b2168..c3c22a218d29 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SetupScripts.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Details of customized scripts to execute for setting up the cluster. + /// + /// Details of customized scripts to execute for setting up the cluster. + /// Serialized Name: SetupScripts + /// internal partial class SetupScripts { /// Initializes a new instance of SetupScripts. @@ -16,13 +19,19 @@ public SetupScripts() } /// Initializes a new instance of SetupScripts. - /// Customized setup scripts. - internal SetupScripts(ScriptsToExecute scripts) + /// + /// Customized setup scripts + /// Serialized Name: SetupScripts.scripts + /// + internal SetupScripts(MachineLearningScriptsToExecute scripts) { Scripts = scripts; } - /// Customized setup scripts. - public ScriptsToExecute Scripts { get; set; } + /// + /// Customized setup scripts + /// Serialized Name: SetupScripts.scripts + /// + public MachineLearningScriptsToExecute Scripts { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs deleted file mode 100644 index e5020fa33a41..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SharedPrivateLinkResource.Serialization.cs +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SharedPrivateLinkResource : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("properties"); - writer.WriteStartObject(); - if (Optional.IsDefined(PrivateLinkResourceId)) - { - writer.WritePropertyName("privateLinkResourceId"); - writer.WriteStringValue(PrivateLinkResourceId); - } - if (Optional.IsDefined(GroupId)) - { - writer.WritePropertyName("groupId"); - writer.WriteStringValue(GroupId); - } - if (Optional.IsDefined(RequestMessage)) - { - writer.WritePropertyName("requestMessage"); - writer.WriteStringValue(RequestMessage); - } - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"); - writer.WriteStringValue(Status.Value.ToString()); - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static SharedPrivateLinkResource DeserializeSharedPrivateLinkResource(JsonElement element) - { - Optional name = default; - Optional privateLinkResourceId = default; - Optional groupId = default; - Optional requestMessage = default; - Optional status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("privateLinkResourceId")) - { - privateLinkResourceId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("groupId")) - { - groupId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("requestMessage")) - { - requestMessage = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("status")) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new MachineLearningPrivateEndpointServiceConnectionStatus(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new SharedPrivateLinkResource(name.Value, privateLinkResourceId.Value, groupId.Value, requestMessage.Value, Optional.ToNullable(status)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SharedPrivateLinkResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SharedPrivateLinkResource.cs deleted file mode 100644 index 3071c6604c10..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SharedPrivateLinkResource.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The SharedPrivateLinkResource. - public partial class SharedPrivateLinkResource - { - /// Initializes a new instance of SharedPrivateLinkResource. - public SharedPrivateLinkResource() - { - } - - /// Initializes a new instance of SharedPrivateLinkResource. - /// Unique name of the private link. - /// The resource id that private link links to. - /// The private link resource group id. - /// Request message. - /// Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - internal SharedPrivateLinkResource(string name, string privateLinkResourceId, string groupId, string requestMessage, MachineLearningPrivateEndpointServiceConnectionStatus? status) - { - Name = name; - PrivateLinkResourceId = privateLinkResourceId; - GroupId = groupId; - RequestMessage = requestMessage; - Status = status; - } - - /// Unique name of the private link. - public string Name { get; set; } - /// The resource id that private link links to. - public string PrivateLinkResourceId { get; set; } - /// The private link resource group id. - public string GroupId { get; set; } - /// Request message. - public string RequestMessage { get; set; } - /// 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/ShortSeriesHandlingConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ShortSeriesHandlingConfiguration.cs deleted file mode 100644 index 5ce78c69fce4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ShortSeriesHandlingConfiguration.cs +++ /dev/null @@ -1,57 +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 parameter defining how if AutoML should handle short time series. - public readonly partial struct ShortSeriesHandlingConfiguration : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ShortSeriesHandlingConfiguration(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string AutoValue = "Auto"; - private const string PadValue = "Pad"; - private const string DropValue = "Drop"; - - /// Represents no/null value. - public static ShortSeriesHandlingConfiguration None { get; } = new ShortSeriesHandlingConfiguration(NoneValue); - /// Short series will be padded if there are no long series, otherwise short series will be dropped. - public static ShortSeriesHandlingConfiguration Auto { get; } = new ShortSeriesHandlingConfiguration(AutoValue); - /// All the short series will be padded. - public static ShortSeriesHandlingConfiguration Pad { get; } = new ShortSeriesHandlingConfiguration(PadValue); - /// All the short series will be dropped. - public static ShortSeriesHandlingConfiguration Drop { get; } = new ShortSeriesHandlingConfiguration(DropValue); - /// Determines if two values are the same. - public static bool operator ==(ShortSeriesHandlingConfiguration left, ShortSeriesHandlingConfiguration right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ShortSeriesHandlingConfiguration left, ShortSeriesHandlingConfiguration right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ShortSeriesHandlingConfiguration(string value) => new ShortSeriesHandlingConfiguration(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ShortSeriesHandlingConfiguration other && Equals(other); - /// - public bool Equals(ShortSeriesHandlingConfiguration other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuCapacity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuCapacity.Serialization.cs deleted file mode 100644 index ca6524daa546..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuCapacity.Serialization.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SkuCapacity - { - internal static SkuCapacity DeserializeSkuCapacity(JsonElement element) - { - Optional @default = default; - Optional maximum = default; - Optional minimum = default; - Optional scaleType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("default")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - @default = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maximum")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maximum = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("minimum")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minimum = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("scaleType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - scaleType = new SkuScaleType(property.Value.GetString()); - continue; - } - } - return new SkuCapacity(Optional.ToNullable(@default), Optional.ToNullable(maximum), Optional.ToNullable(minimum), Optional.ToNullable(scaleType)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuCapacity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuCapacity.cs deleted file mode 100644 index af6832229727..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuCapacity.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// SKU capacity information. - public partial class SkuCapacity - { - /// Initializes a new instance of SkuCapacity. - internal SkuCapacity() - { - } - - /// Initializes a new instance of SkuCapacity. - /// Gets or sets the default capacity. - /// Gets or sets the maximum. - /// Gets or sets the minimum. - /// Gets or sets the type of the scale. - internal SkuCapacity(int? @default, int? maximum, int? minimum, SkuScaleType? scaleType) - { - Default = @default; - Maximum = maximum; - Minimum = minimum; - ScaleType = scaleType; - } - - /// 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 type of the scale. - public SkuScaleType? ScaleType { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResource.Serialization.cs deleted file mode 100644 index f76c15269167..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResource.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SkuResource - { - internal static SkuResource DeserializeSkuResource(JsonElement element) - { - Optional capacity = default; - Optional resourceType = default; - Optional sku = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("capacity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - capacity = null; - continue; - } - capacity = SkuCapacity.DeserializeSkuCapacity(property.Value); - continue; - } - if (property.NameEquals("resourceType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceType = null; - continue; - } - resourceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("sku")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - sku = null; - continue; - } - sku = SkuSetting.DeserializeSkuSetting(property.Value); - continue; - } - } - return new SkuResource(capacity.Value, resourceType.Value, sku.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResource.cs deleted file mode 100644 index 3e3a937a6281..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResource.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Fulfills ARM Contract requirement to list all available SKUS for a resource. - public partial class SkuResource - { - /// Initializes a new instance of SkuResource. - internal SkuResource() - { - } - - /// Initializes a new instance of SkuResource. - /// Gets or sets the Sku Capacity. - /// The resource type name. - /// Gets or sets the Sku. - internal SkuResource(SkuCapacity capacity, string resourceType, SkuSetting sku) - { - Capacity = capacity; - ResourceType = resourceType; - Sku = sku; - } - - /// Gets or sets the Sku Capacity. - public SkuCapacity Capacity { get; } - /// The resource type name. - public string ResourceType { get; } - /// Gets or sets the Sku. - public SkuSetting Sku { get; } - } -} 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 b106584865ef..3bee951b1d2f 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 @@ -16,7 +16,7 @@ internal partial class SkuResourceArmPaginatedResult internal static SkuResourceArmPaginatedResult DeserializeSkuResourceArmPaginatedResult(JsonElement element) { Optional nextLink = default; - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("nextLink")) @@ -31,10 +31,10 @@ internal static SkuResourceArmPaginatedResult DeserializeSkuResourceArmPaginated property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SkuResource.DeserializeSkuResource(item)); + array.Add(MachineLearningSkuDetail.DeserializeMachineLearningSkuDetail(item)); } value = array; continue; 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 24105e748a1a..e8a0b2f09f6d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuResourceArmPaginatedResult.cs @@ -10,27 +10,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// A paginated list of SkuResource entities. + /// + /// A paginated list of SkuResource entities. + /// Serialized Name: SkuResourceArmPaginatedResult + /// internal partial class SkuResourceArmPaginatedResult { /// Initializes a new instance of SkuResourceArmPaginatedResult. internal SkuResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of SkuResourceArmPaginatedResult. - /// The link to the next page of SkuResource objects. If null, there are no additional pages. - /// An array of objects of type SkuResource. - internal SkuResourceArmPaginatedResult(string nextLink, IReadOnlyList value) + /// + /// The link to the next page of SkuResource objects. If null, there are no additional pages. + /// Serialized Name: SkuResourceArmPaginatedResult.nextLink + /// + /// + /// An array of objects of type SkuResource. + /// Serialized Name: SkuResourceArmPaginatedResult.value + /// + internal SkuResourceArmPaginatedResult(string nextLink, IReadOnlyList value) { NextLink = nextLink; Value = value; } - /// The link to the next page of SkuResource objects. If null, there are no additional pages. + /// + /// The link to the next page of SkuResource objects. If null, there are no additional pages. + /// Serialized Name: SkuResourceArmPaginatedResult.nextLink + /// public string NextLink { get; } - /// An array of objects of type SkuResource. - public IReadOnlyList Value { get; } + /// + /// An array of objects of type SkuResource. + /// Serialized Name: SkuResourceArmPaginatedResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuScaleType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuScaleType.cs deleted file mode 100644 index 02e629be5201..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuScaleType.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 -{ - /// Node scaling setting for the compute sku. - public readonly partial struct SkuScaleType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SkuScaleType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutomaticValue = "Automatic"; - private const string ManualValue = "Manual"; - private const string NoneValue = "None"; - - /// Automatically scales node count. - public static SkuScaleType Automatic { get; } = new SkuScaleType(AutomaticValue); - /// Node count scaled upon user request. - public static SkuScaleType Manual { get; } = new SkuScaleType(ManualValue); - /// Fixed set of nodes. - public static SkuScaleType None { get; } = new SkuScaleType(NoneValue); - /// Determines if two values are the same. - public static bool operator ==(SkuScaleType left, SkuScaleType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SkuScaleType left, SkuScaleType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SkuScaleType(string value) => new SkuScaleType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SkuScaleType other && Equals(other); - /// - public bool Equals(SkuScaleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuSetting.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuSetting.Serialization.cs deleted file mode 100644 index 61d9fd172a56..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuSetting.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SkuSetting - { - internal static SkuSetting DeserializeSkuSetting(JsonElement element) - { - string name = default; - Optional tier = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("tier")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - tier = property.Value.GetString().ToMachineLearningSkuTier(); - continue; - } - } - return new SkuSetting(name, Optional.ToNullable(tier)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuSetting.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuSetting.cs deleted file mode 100644 index 7756cedaeb30..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SkuSetting.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// SkuSetting fulfills the need for stripped down SKU info in ARM contract. - public partial class SkuSetting - { - /// Initializes a new instance of SkuSetting. - /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - /// is null. - internal SkuSetting(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of SkuSetting. - /// [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. - internal SkuSetting(string name, MachineLearningSkuTier? tier) - { - Name = name; - Tier = tier; - } - - /// [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - public string Name { get; } - /// 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SourceType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SourceType.cs deleted file mode 100644 index a77f5658c93a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SourceType.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 -{ - /// Data source type. - public readonly partial struct SourceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SourceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DatasetValue = "Dataset"; - private const string DatastoreValue = "Datastore"; - private const string UriValue = "URI"; - - /// Dataset. - public static SourceType Dataset { get; } = new SourceType(DatasetValue); - /// Datastore. - public static SourceType Datastore { get; } = new SourceType(DatastoreValue); - /// URI. - public static SourceType Uri { get; } = new SourceType(UriValue); - /// Determines if two values are the same. - public static bool operator ==(SourceType left, SourceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SourceType left, SourceType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SourceType(string value) => new SourceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SourceType other && Equals(other); - /// - public bool Equals(SourceType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SshPublicAccess.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SshPublicAccess.cs deleted file mode 100644 index 05f62ed9616f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SshPublicAccess.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 -{ - /// State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable. - public readonly partial struct SshPublicAccess : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SshPublicAccess(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string EnabledValue = "Enabled"; - private const string DisabledValue = "Disabled"; - - /// Enabled. - public static SshPublicAccess Enabled { get; } = new SshPublicAccess(EnabledValue); - /// Disabled. - public static SshPublicAccess Disabled { get; } = new SshPublicAccess(DisabledValue); - /// Determines if two values are the same. - public static bool operator ==(SshPublicAccess left, SshPublicAccess right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SshPublicAccess left, SshPublicAccess right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SshPublicAccess(string value) => new SshPublicAccess(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SshPublicAccess other && Equals(other); - /// - public bool Equals(SshPublicAccess other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfigStatus.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfigStatus.cs deleted file mode 100644 index af0b6b57af82..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfigStatus.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 -{ - /// Enable or disable ssl for scoring. - public readonly partial struct SslConfigStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public SslConfigStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DisabledValue = "Disabled"; - private const string EnabledValue = "Enabled"; - private const string AutoValue = "Auto"; - - /// Disabled. - public static SslConfigStatus Disabled { get; } = new SslConfigStatus(DisabledValue); - /// Enabled. - public static SslConfigStatus Enabled { get; } = new SslConfigStatus(EnabledValue); - /// Auto. - public static SslConfigStatus Auto { get; } = new SslConfigStatus(AutoValue); - /// Determines if two values are the same. - public static bool operator ==(SslConfigStatus left, SslConfigStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(SslConfigStatus left, SslConfigStatus right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator SslConfigStatus(string value) => new SslConfigStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is SslConfigStatus other && Equals(other); - /// - public bool Equals(SslConfigStatus other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfiguration.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfiguration.Serialization.cs deleted file mode 100644 index 5a8578e63372..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfiguration.Serialization.cs +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SslConfiguration : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"); - writer.WriteStringValue(Status.Value.ToString()); - } - if (Optional.IsDefined(Cert)) - { - if (Cert != null) - { - writer.WritePropertyName("cert"); - writer.WriteStringValue(Cert); - } - else - { - writer.WriteNull("cert"); - } - } - if (Optional.IsDefined(Key)) - { - if (Key != null) - { - writer.WritePropertyName("key"); - writer.WriteStringValue(Key); - } - else - { - writer.WriteNull("key"); - } - } - if (Optional.IsDefined(Cname)) - { - if (Cname != null) - { - writer.WritePropertyName("cname"); - writer.WriteStringValue(Cname); - } - else - { - writer.WriteNull("cname"); - } - } - if (Optional.IsDefined(LeafDomainLabel)) - { - if (LeafDomainLabel != null) - { - writer.WritePropertyName("leafDomainLabel"); - writer.WriteStringValue(LeafDomainLabel); - } - else - { - writer.WriteNull("leafDomainLabel"); - } - } - if (Optional.IsDefined(OverwriteExistingDomain)) - { - writer.WritePropertyName("overwriteExistingDomain"); - writer.WriteBooleanValue(OverwriteExistingDomain.Value); - } - writer.WriteEndObject(); - } - - internal static SslConfiguration DeserializeSslConfiguration(JsonElement element) - { - Optional status = default; - Optional cert = default; - Optional key = default; - Optional cname = default; - Optional leafDomainLabel = default; - Optional overwriteExistingDomain = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new SslConfigStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("cert")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - cert = null; - continue; - } - cert = property.Value.GetString(); - continue; - } - if (property.NameEquals("key")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - key = null; - continue; - } - key = property.Value.GetString(); - continue; - } - if (property.NameEquals("cname")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - cname = null; - continue; - } - cname = property.Value.GetString(); - continue; - } - if (property.NameEquals("leafDomainLabel")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - leafDomainLabel = null; - continue; - } - leafDomainLabel = property.Value.GetString(); - continue; - } - if (property.NameEquals("overwriteExistingDomain")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - overwriteExistingDomain = property.Value.GetBoolean(); - continue; - } - } - return new SslConfiguration(Optional.ToNullable(status), cert.Value, key.Value, cname.Value, leafDomainLabel.Value, Optional.ToNullable(overwriteExistingDomain)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfiguration.cs deleted file mode 100644 index 6df065d74554..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SslConfiguration.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The ssl configuration for scoring. - public partial class SslConfiguration - { - /// Initializes a new instance of SslConfiguration. - public SslConfiguration() - { - } - - /// Initializes a new instance of SslConfiguration. - /// Enable or disable ssl for scoring. - /// Cert data. - /// Key data. - /// CNAME of the cert. - /// Leaf domain label of public endpoint. - /// Indicates whether to overwrite existing domain label. - internal SslConfiguration(SslConfigStatus? status, string cert, string key, string cname, string leafDomainLabel, bool? overwriteExistingDomain) - { - Status = status; - Cert = cert; - Key = key; - Cname = cname; - LeafDomainLabel = leafDomainLabel; - OverwriteExistingDomain = overwriteExistingDomain; - } - - /// Enable or disable ssl for scoring. - public SslConfigStatus? Status { get; set; } - /// Cert data. - public string Cert { get; set; } - /// Key data. - public string Key { get; set; } - /// CNAME of the cert. - public string Cname { get; set; } - /// Leaf domain label of public endpoint. - public string LeafDomainLabel { get; set; } - /// Indicates whether to overwrite existing domain label. - public bool? OverwriteExistingDomain { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackEnsembleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackEnsembleSettings.Serialization.cs deleted file mode 100644 index 9e37e595dcc4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackEnsembleSettings.Serialization.cs +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class StackEnsembleSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(StackMetaLearnerKWargs)) - { - if (StackMetaLearnerKWargs != null) - { - writer.WritePropertyName("stackMetaLearnerKWargs"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(StackMetaLearnerKWargs); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(StackMetaLearnerKWargs.ToString()).RootElement); -#endif - } - else - { - writer.WriteNull("stackMetaLearnerKWargs"); - } - } - if (Optional.IsDefined(StackMetaLearnerTrainPercentage)) - { - writer.WritePropertyName("stackMetaLearnerTrainPercentage"); - writer.WriteNumberValue(StackMetaLearnerTrainPercentage.Value); - } - if (Optional.IsDefined(StackMetaLearnerType)) - { - writer.WritePropertyName("stackMetaLearnerType"); - writer.WriteStringValue(StackMetaLearnerType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static StackEnsembleSettings DeserializeStackEnsembleSettings(JsonElement element) - { - Optional stackMetaLearnerKWargs = default; - Optional stackMetaLearnerTrainPercentage = default; - Optional stackMetaLearnerType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("stackMetaLearnerKWargs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - stackMetaLearnerKWargs = null; - continue; - } - stackMetaLearnerKWargs = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("stackMetaLearnerTrainPercentage")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - stackMetaLearnerTrainPercentage = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("stackMetaLearnerType")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - stackMetaLearnerType = new StackMetaLearnerType(property.Value.GetString()); - continue; - } - } - return new StackEnsembleSettings(stackMetaLearnerKWargs.Value, Optional.ToNullable(stackMetaLearnerTrainPercentage), Optional.ToNullable(stackMetaLearnerType)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackEnsembleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackEnsembleSettings.cs deleted file mode 100644 index aee542a963b1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackEnsembleSettings.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Advances setting to customize StackEnsemble run. - public partial class StackEnsembleSettings - { - /// Initializes a new instance of StackEnsembleSettings. - public StackEnsembleSettings() - { - } - - /// Initializes a new instance of StackEnsembleSettings. - /// 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. - internal StackEnsembleSettings(BinaryData stackMetaLearnerKWargs, double? stackMetaLearnerTrainPercentage, StackMetaLearnerType? stackMetaLearnerType) - { - StackMetaLearnerKWargs = stackMetaLearnerKWargs; - StackMetaLearnerTrainPercentage = stackMetaLearnerTrainPercentage; - StackMetaLearnerType = stackMetaLearnerType; - } - - /// - /// Optional parameters to pass to the initializer of the meta-learner. - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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 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 StackMetaLearnerType? StackMetaLearnerType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackMetaLearnerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackMetaLearnerType.cs deleted file mode 100644 index ad89b368e418..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StackMetaLearnerType.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.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// The meta-learner is a model trained on the output of the individual heterogeneous models. - /// Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). - /// This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression - /// - public readonly partial struct StackMetaLearnerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public StackMetaLearnerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string LogisticRegressionValue = "LogisticRegression"; - private const string LogisticRegressionCVValue = "LogisticRegressionCV"; - private const string LightGBMClassifierValue = "LightGBMClassifier"; - private const string ElasticNetValue = "ElasticNet"; - private const string ElasticNetCVValue = "ElasticNetCV"; - private const string LightGBMRegressorValue = "LightGBMRegressor"; - private const string LinearRegressionValue = "LinearRegression"; - - /// None. - public static StackMetaLearnerType None { get; } = new StackMetaLearnerType(NoneValue); - /// Default meta-learners are LogisticRegression for classification tasks. - public static StackMetaLearnerType LogisticRegression { get; } = new StackMetaLearnerType(LogisticRegressionValue); - /// Default meta-learners are LogisticRegression for classification task when CV is on. - public static StackMetaLearnerType LogisticRegressionCV { get; } = new StackMetaLearnerType(LogisticRegressionCVValue); - /// LightGBMClassifier. - public static StackMetaLearnerType LightGBMClassifier { get; } = new StackMetaLearnerType(LightGBMClassifierValue); - /// Default meta-learners are LogisticRegression for regression task. - public static StackMetaLearnerType ElasticNet { get; } = new StackMetaLearnerType(ElasticNetValue); - /// Default meta-learners are LogisticRegression for regression task when CV is on. - public static StackMetaLearnerType ElasticNetCV { get; } = new StackMetaLearnerType(ElasticNetCVValue); - /// LightGBMRegressor. - public static StackMetaLearnerType LightGBMRegressor { get; } = new StackMetaLearnerType(LightGBMRegressorValue); - /// LinearRegression. - public static StackMetaLearnerType LinearRegression { get; } = new StackMetaLearnerType(LinearRegressionValue); - /// Determines if two values are the same. - public static bool operator ==(StackMetaLearnerType left, StackMetaLearnerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(StackMetaLearnerType left, StackMetaLearnerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator StackMetaLearnerType(string value) => new StackMetaLearnerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is StackMetaLearnerType other && Equals(other); - /// - public bool Equals(StackMetaLearnerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Status.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Status.cs deleted file mode 100644 index 4f758f38b1e0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Status.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.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Status of update workspace quota. - public readonly partial struct Status : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Status(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UndefinedValue = "Undefined"; - private const string SuccessValue = "Success"; - private const string FailureValue = "Failure"; - private const string InvalidQuotaBelowClusterMinimumValue = "InvalidQuotaBelowClusterMinimum"; - private const string InvalidQuotaExceedsSubscriptionLimitValue = "InvalidQuotaExceedsSubscriptionLimit"; - private const string InvalidVmFamilyNameValue = "InvalidVMFamilyName"; - private const string OperationNotSupportedForSkuValue = "OperationNotSupportedForSku"; - private const string OperationNotEnabledForRegionValue = "OperationNotEnabledForRegion"; - - /// Undefined. - public static Status Undefined { get; } = new Status(UndefinedValue); - /// Success. - public static Status Success { get; } = new Status(SuccessValue); - /// Failure. - public static Status Failure { get; } = new Status(FailureValue); - /// InvalidQuotaBelowClusterMinimum. - public static Status InvalidQuotaBelowClusterMinimum { get; } = new Status(InvalidQuotaBelowClusterMinimumValue); - /// InvalidQuotaExceedsSubscriptionLimit. - public static Status InvalidQuotaExceedsSubscriptionLimit { get; } = new Status(InvalidQuotaExceedsSubscriptionLimitValue); - /// InvalidVMFamilyName. - public static Status InvalidVmFamilyName { get; } = new Status(InvalidVmFamilyNameValue); - /// OperationNotSupportedForSku. - public static Status OperationNotSupportedForSku { get; } = new Status(OperationNotSupportedForSkuValue); - /// OperationNotEnabledForRegion. - public static Status OperationNotEnabledForRegion { get; } = new Status(OperationNotEnabledForRegionValue); - /// Determines if two values are the same. - public static bool operator ==(Status left, Status right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Status left, Status right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator Status(string value) => new Status(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Status other && Equals(other); - /// - public bool Equals(Status other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StochasticOptimizer.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StochasticOptimizer.cs index 4b22a1f78fba..08740bf7b8eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StochasticOptimizer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StochasticOptimizer.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Stochastic optimizer for image models. + /// + /// Stochastic optimizer for image models. + /// Serialized Name: StochasticOptimizer + /// public readonly partial struct StochasticOptimizer : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public StochasticOptimizer(string value) private const string AdamValue = "Adam"; private const string AdamwValue = "Adamw"; - /// No optimizer selected. + /// + /// No optimizer selected. + /// Serialized Name: StochasticOptimizer.None + /// public static StochasticOptimizer None { get; } = new StochasticOptimizer(NoneValue); - /// Stochastic Gradient Descent optimizer. + /// + /// Stochastic Gradient Descent optimizer. + /// Serialized Name: StochasticOptimizer.Sgd + /// public static StochasticOptimizer Sgd { get; } = new StochasticOptimizer(SgdValue); - /// Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments. + /// + /// Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments + /// Serialized Name: StochasticOptimizer.Adam + /// public static StochasticOptimizer Adam { get; } = new StochasticOptimizer(AdamValue); - /// AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. + /// + /// AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay. + /// Serialized Name: StochasticOptimizer.Adamw + /// public static StochasticOptimizer Adamw { get; } = new StochasticOptimizer(AdamwValue); /// Determines if two values are the same. public static bool operator ==(StochasticOptimizer left, StochasticOptimizer right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountType.cs deleted file mode 100644 index c97e88d0a6a9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/StorageAccountType.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 -{ - /// type of this storage account. - public readonly partial struct StorageAccountType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public StorageAccountType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StandardLRSValue = "Standard_LRS"; - private const string PremiumLRSValue = "Premium_LRS"; - - /// Standard_LRS. - public static StorageAccountType StandardLRS { get; } = new StorageAccountType(StandardLRSValue); - /// Premium_LRS. - public static StorageAccountType PremiumLRS { get; } = new StorageAccountType(PremiumLRSValue); - /// Determines if two values are the same. - public static bool operator ==(StorageAccountType left, StorageAccountType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(StorageAccountType left, StorageAccountType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator StorageAccountType(string value) => new StorageAccountType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is StorageAccountType other && Equals(other); - /// - public bool Equals(StorageAccountType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJob.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJob.Serialization.cs deleted file mode 100644 index d591b121ee6a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJob.Serialization.cs +++ /dev/null @@ -1,472 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SweepJob : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EarlyTermination)) - { - if (EarlyTermination != null) - { - writer.WritePropertyName("earlyTermination"); - writer.WriteObjectValue(EarlyTermination); - } - else - { - writer.WriteNull("earlyTermination"); - } - } - if (Optional.IsCollectionDefined(Inputs)) - { - if (Inputs != null) - { - writer.WritePropertyName("inputs"); - writer.WriteStartObject(); - foreach (var item in Inputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("inputs"); - } - } - if (Optional.IsDefined(Limits)) - { - writer.WritePropertyName("limits"); - writer.WriteObjectValue(Limits); - } - writer.WritePropertyName("objective"); - writer.WriteObjectValue(Objective); - if (Optional.IsCollectionDefined(Outputs)) - { - if (Outputs != null) - { - writer.WritePropertyName("outputs"); - writer.WriteStartObject(); - foreach (var item in Outputs) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("outputs"); - } - } - writer.WritePropertyName("samplingAlgorithm"); - writer.WriteObjectValue(SamplingAlgorithm); - writer.WritePropertyName("searchSpace"); -#if NET6_0_OR_GREATER - writer.WriteRawValue(SearchSpace); -#else - JsonSerializer.Serialize(writer, JsonDocument.Parse(SearchSpace.ToString()).RootElement); -#endif - writer.WritePropertyName("trial"); - writer.WriteObjectValue(Trial); - if (Optional.IsDefined(ComponentId)) - { - if (ComponentId != null) - { - writer.WritePropertyName("componentId"); - writer.WriteStringValue(ComponentId); - } - else - { - writer.WriteNull("componentId"); - } - } - if (Optional.IsDefined(ComputeId)) - { - if (ComputeId != null) - { - writer.WritePropertyName("computeId"); - writer.WriteStringValue(ComputeId); - } - else - { - writer.WriteNull("computeId"); - } - } - if (Optional.IsDefined(DisplayName)) - { - if (DisplayName != null) - { - writer.WritePropertyName("displayName"); - writer.WriteStringValue(DisplayName); - } - else - { - writer.WriteNull("displayName"); - } - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(Identity)) - { - if (Identity != null) - { - writer.WritePropertyName("identity"); - writer.WriteObjectValue(Identity); - } - else - { - writer.WriteNull("identity"); - } - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - writer.WritePropertyName("jobType"); - writer.WriteStringValue(JobType.ToString()); - if (Optional.IsCollectionDefined(Services)) - { - if (Services != null) - { - writer.WritePropertyName("services"); - writer.WriteStartObject(); - foreach (var item in Services) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("services"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static SweepJob DeserializeSweepJob(JsonElement element) - { - Optional earlyTermination = default; - Optional> inputs = default; - Optional limits = default; - Objective objective = default; - Optional> outputs = default; - SamplingAlgorithm samplingAlgorithm = default; - BinaryData searchSpace = default; - TrialComponent trial = default; - Optional componentId = default; - Optional computeId = default; - Optional displayName = default; - Optional experimentName = default; - Optional identity = default; - Optional isArchived = default; - JobType jobType = default; - Optional> services = default; - Optional status = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("earlyTermination")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - earlyTermination = null; - continue; - } - earlyTermination = EarlyTerminationPolicy.DeserializeEarlyTerminationPolicy(property.Value); - continue; - } - if (property.NameEquals("inputs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - inputs = 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, JobInput.DeserializeJobInput(property0.Value)); - } - } - inputs = dictionary; - continue; - } - if (property.NameEquals("limits")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - limits = SweepJobLimits.DeserializeSweepJobLimits(property.Value); - continue; - } - if (property.NameEquals("objective")) - { - objective = Objective.DeserializeObjective(property.Value); - continue; - } - if (property.NameEquals("outputs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - outputs = 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, JobOutput.DeserializeJobOutput(property0.Value)); - } - } - outputs = dictionary; - continue; - } - if (property.NameEquals("samplingAlgorithm")) - { - samplingAlgorithm = SamplingAlgorithm.DeserializeSamplingAlgorithm(property.Value); - continue; - } - if (property.NameEquals("searchSpace")) - { - searchSpace = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("trial")) - { - trial = TrialComponent.DeserializeTrialComponent(property.Value); - continue; - } - if (property.NameEquals("componentId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - componentId = null; - continue; - } - componentId = property.Value.GetString(); - continue; - } - if (property.NameEquals("computeId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - computeId = null; - continue; - } - computeId = property.Value.GetString(); - continue; - } - if (property.NameEquals("displayName")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - displayName = null; - continue; - } - displayName = property.Value.GetString(); - continue; - } - if (property.NameEquals("experimentName")) - { - experimentName = property.Value.GetString(); - continue; - } - if (property.NameEquals("identity")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - identity = null; - continue; - } - identity = IdentityConfiguration.DeserializeIdentityConfiguration(property.Value); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("jobType")) - { - jobType = new JobType(property.Value.GetString()); - continue; - } - if (property.NameEquals("services")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - services = 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, JobService.DeserializeJobService(property0.Value)); - } - } - services = dictionary; - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new JobStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new SweepJob(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), componentId.Value, computeId.Value, displayName.Value, experimentName.Value, identity.Value, Optional.ToNullable(isArchived), jobType, Optional.ToDictionary(services), Optional.ToNullable(status), earlyTermination.Value, Optional.ToDictionary(inputs), limits.Value, objective, Optional.ToDictionary(outputs), samplingAlgorithm, searchSpace, trial); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJob.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJob.cs deleted file mode 100644 index a9af50af3305..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJob.cs +++ /dev/null @@ -1,163 +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 -{ - /// Sweep job definition. - public partial class SweepJob : MachineLearningJobProperties - { - /// Initializes a new instance of SweepJob. - /// [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 SweepJob(Objective objective, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, TrialComponent trial) - { - Argument.AssertNotNull(objective, nameof(objective)); - Argument.AssertNotNull(samplingAlgorithm, nameof(samplingAlgorithm)); - Argument.AssertNotNull(searchSpace, nameof(searchSpace)); - Argument.AssertNotNull(trial, nameof(trial)); - - Inputs = new ChangeTrackingDictionary(); - Objective = objective; - Outputs = new ChangeTrackingDictionary(); - SamplingAlgorithm = samplingAlgorithm; - SearchSpace = searchSpace; - Trial = trial; - JobType = JobType.Sweep; - } - - /// Initializes a new instance of SweepJob. - /// 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?. - /// [Required] Specifies the type of 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 . - /// - /// - /// [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 SweepJob(string description, IDictionary properties, IDictionary tags, string componentId, string computeId, string displayName, string experimentName, IdentityConfiguration identity, bool? isArchived, JobType jobType, IDictionary services, JobStatus? status, EarlyTerminationPolicy earlyTermination, IDictionary inputs, SweepJobLimits limits, Objective objective, IDictionary outputs, SamplingAlgorithm samplingAlgorithm, BinaryData searchSpace, TrialComponent trial) : base(description, properties, tags, componentId, computeId, displayName, experimentName, identity, isArchived, jobType, services, status) - { - EarlyTermination = earlyTermination; - Inputs = inputs; - Limits = limits; - Objective = objective; - Outputs = outputs; - SamplingAlgorithm = samplingAlgorithm; - SearchSpace = searchSpace; - Trial = trial; - JobType = jobType; - } - - /// - /// 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 EarlyTerminationPolicy 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 SweepJobLimits Limits { get; set; } - /// [Required] Optimization objective. - public Objective 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; } - /// - /// [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 - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formated 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 SearchSpace { get; set; } - /// [Required] Trial component definition. - public TrialComponent Trial { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJobLimits.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJobLimits.Serialization.cs deleted file mode 100644 index 2b9ac340eba9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJobLimits.Serialization.cs +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SweepJobLimits : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxConcurrentTrials)) - { - if (MaxConcurrentTrials != null) - { - writer.WritePropertyName("maxConcurrentTrials"); - writer.WriteNumberValue(MaxConcurrentTrials.Value); - } - else - { - writer.WriteNull("maxConcurrentTrials"); - } - } - if (Optional.IsDefined(MaxTotalTrials)) - { - if (MaxTotalTrials != null) - { - writer.WritePropertyName("maxTotalTrials"); - writer.WriteNumberValue(MaxTotalTrials.Value); - } - else - { - writer.WriteNull("maxTotalTrials"); - } - } - if (Optional.IsDefined(TrialTimeout)) - { - if (TrialTimeout != null) - { - writer.WritePropertyName("trialTimeout"); - writer.WriteStringValue(TrialTimeout.Value, "P"); - } - else - { - writer.WriteNull("trialTimeout"); - } - } - writer.WritePropertyName("jobLimitsType"); - writer.WriteStringValue(JobLimitsType.ToString()); - if (Optional.IsDefined(Timeout)) - { - if (Timeout != null) - { - writer.WritePropertyName("timeout"); - writer.WriteStringValue(Timeout.Value, "P"); - } - else - { - writer.WriteNull("timeout"); - } - } - writer.WriteEndObject(); - } - - internal static SweepJobLimits DeserializeSweepJobLimits(JsonElement element) - { - Optional maxConcurrentTrials = default; - Optional maxTotalTrials = default; - Optional trialTimeout = default; - JobLimitsType jobLimitsType = default; - Optional timeout = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxConcurrentTrials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxConcurrentTrials = null; - continue; - } - maxConcurrentTrials = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxTotalTrials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxTotalTrials = null; - continue; - } - maxTotalTrials = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("trialTimeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - trialTimeout = null; - continue; - } - trialTimeout = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("jobLimitsType")) - { - jobLimitsType = new JobLimitsType(property.Value.GetString()); - continue; - } - if (property.NameEquals("timeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - timeout = null; - continue; - } - timeout = property.Value.GetTimeSpan("P"); - continue; - } - } - return new SweepJobLimits(jobLimitsType, Optional.ToNullable(timeout), Optional.ToNullable(maxConcurrentTrials), Optional.ToNullable(maxTotalTrials), Optional.ToNullable(trialTimeout)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJobLimits.cs deleted file mode 100644 index 703624dba5a3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SweepJobLimits.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Sweep Job limit class. - public partial class SweepJobLimits : JobLimits - { - /// Initializes a new instance of SweepJobLimits. - public SweepJobLimits() - { - JobLimitsType = JobLimitsType.Sweep; - } - - /// Initializes a new instance of SweepJobLimits. - /// [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. - /// Sweep Job max concurrent trials. - /// Sweep Job max total trials. - /// Sweep Job Trial timeout value. - internal SweepJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout, int? maxConcurrentTrials, int? maxTotalTrials, TimeSpan? trialTimeout) : base(jobLimitsType, timeout) - { - MaxConcurrentTrials = maxConcurrentTrials; - MaxTotalTrials = maxTotalTrials; - 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 Trial timeout value. - public TimeSpan? TrialTimeout { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkCompute.Serialization.cs deleted file mode 100644 index dba1eb9e6356..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SynapseSparkCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static SynapseSparkCompute DeserializeSynapseSparkCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = SynapseSparkProperties.DeserializeSynapseSparkProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new SynapseSparkCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkCompute.cs deleted file mode 100644 index 161aa84594ac..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkCompute.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 -{ - /// A SynapseSpark compute. - public partial class SynapseSparkCompute : Compute - { - /// Initializes a new instance of SynapseSparkCompute. - public SynapseSparkCompute() - { - ComputeType = ComputeType.SynapseSpark; - } - - /// Initializes a new instance of SynapseSparkCompute. - /// 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. - /// - internal SynapseSparkCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, SynapseSparkProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// Gets or sets the properties. - public SynapseSparkProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkProperties.Serialization.cs deleted file mode 100644 index e6d4805e1d1e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkProperties.Serialization.cs +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SynapseSparkProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(AutoScaleProperties)) - { - writer.WritePropertyName("autoScaleProperties"); - writer.WriteObjectValue(AutoScaleProperties); - } - if (Optional.IsDefined(AutoPauseProperties)) - { - writer.WritePropertyName("autoPauseProperties"); - writer.WriteObjectValue(AutoPauseProperties); - } - if (Optional.IsDefined(SparkVersion)) - { - writer.WritePropertyName("sparkVersion"); - writer.WriteStringValue(SparkVersion); - } - if (Optional.IsDefined(NodeCount)) - { - writer.WritePropertyName("nodeCount"); - writer.WriteNumberValue(NodeCount.Value); - } - if (Optional.IsDefined(NodeSize)) - { - writer.WritePropertyName("nodeSize"); - writer.WriteStringValue(NodeSize); - } - if (Optional.IsDefined(NodeSizeFamily)) - { - writer.WritePropertyName("nodeSizeFamily"); - writer.WriteStringValue(NodeSizeFamily); - } - if (Optional.IsDefined(SubscriptionId)) - { - writer.WritePropertyName("subscriptionId"); - writer.WriteStringValue(SubscriptionId); - } - if (Optional.IsDefined(ResourceGroup)) - { - writer.WritePropertyName("resourceGroup"); - writer.WriteStringValue(ResourceGroup); - } - if (Optional.IsDefined(WorkspaceName)) - { - writer.WritePropertyName("workspaceName"); - writer.WriteStringValue(WorkspaceName); - } - if (Optional.IsDefined(PoolName)) - { - writer.WritePropertyName("poolName"); - writer.WriteStringValue(PoolName); - } - writer.WriteEndObject(); - } - - internal static SynapseSparkProperties DeserializeSynapseSparkProperties(JsonElement element) - { - Optional autoScaleProperties = default; - Optional autoPauseProperties = default; - Optional sparkVersion = default; - Optional nodeCount = default; - Optional nodeSize = default; - Optional nodeSizeFamily = default; - Optional subscriptionId = default; - Optional resourceGroup = default; - Optional workspaceName = default; - Optional poolName = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("autoScaleProperties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoScaleProperties = AutoScaleProperties.DeserializeAutoScaleProperties(property.Value); - continue; - } - if (property.NameEquals("autoPauseProperties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - autoPauseProperties = AutoPauseProperties.DeserializeAutoPauseProperties(property.Value); - continue; - } - if (property.NameEquals("sparkVersion")) - { - sparkVersion = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodeCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - nodeCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("nodeSize")) - { - nodeSize = property.Value.GetString(); - continue; - } - if (property.NameEquals("nodeSizeFamily")) - { - nodeSizeFamily = property.Value.GetString(); - continue; - } - if (property.NameEquals("subscriptionId")) - { - subscriptionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("resourceGroup")) - { - resourceGroup = property.Value.GetString(); - continue; - } - if (property.NameEquals("workspaceName")) - { - workspaceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("poolName")) - { - poolName = property.Value.GetString(); - continue; - } - } - return new SynapseSparkProperties(autoScaleProperties.Value, autoPauseProperties.Value, sparkVersion.Value, Optional.ToNullable(nodeCount), nodeSize.Value, nodeSizeFamily.Value, subscriptionId.Value, resourceGroup.Value, workspaceName.Value, poolName.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkProperties.cs deleted file mode 100644 index c33a5aa158c8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SynapseSparkProperties.cs +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The SynapseSparkProperties. - public partial class SynapseSparkProperties - { - /// Initializes a new instance of SynapseSparkProperties. - public SynapseSparkProperties() - { - } - - /// Initializes a new instance of SynapseSparkProperties. - /// Auto scale properties. - /// Auto pause properties. - /// Spark version. - /// The number of compute nodes currently assigned to the compute. - /// Node size. - /// Node size family. - /// Azure subscription identifier. - /// Name of the resource group in which workspace is located. - /// Name of Azure Machine Learning workspace. - /// Pool name. - internal SynapseSparkProperties(AutoScaleProperties autoScaleProperties, AutoPauseProperties autoPauseProperties, string sparkVersion, int? nodeCount, string nodeSize, string nodeSizeFamily, string subscriptionId, string resourceGroup, string workspaceName, string poolName) - { - AutoScaleProperties = autoScaleProperties; - AutoPauseProperties = autoPauseProperties; - SparkVersion = sparkVersion; - NodeCount = nodeCount; - NodeSize = nodeSize; - NodeSizeFamily = nodeSizeFamily; - SubscriptionId = subscriptionId; - ResourceGroup = resourceGroup; - WorkspaceName = workspaceName; - PoolName = poolName; - } - - /// Auto scale properties. - public AutoScaleProperties AutoScaleProperties { get; set; } - /// Auto pause properties. - public AutoPauseProperties AutoPauseProperties { get; set; } - /// Spark version. - public string SparkVersion { get; set; } - /// The number of compute nodes currently assigned to the compute. - public int? NodeCount { get; set; } - /// Node size. - public string NodeSize { get; set; } - /// Node size family. - public string NodeSizeFamily { get; set; } - /// Azure subscription identifier. - public string SubscriptionId { get; set; } - /// Name of the resource group in which workspace is located. - public string ResourceGroup { get; set; } - /// Name of Azure Machine Learning workspace. - public string WorkspaceName { get; set; } - /// Pool name. - public string PoolName { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemService.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemService.Serialization.cs deleted file mode 100644 index ae43250e8266..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemService.Serialization.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class SystemService - { - internal static SystemService DeserializeSystemService(JsonElement element) - { - Optional systemServiceType = default; - Optional publicIPAddress = default; - Optional version = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("systemServiceType")) - { - systemServiceType = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicIpAddress")) - { - publicIPAddress = property.Value.GetString(); - continue; - } - if (property.NameEquals("version")) - { - version = property.Value.GetString(); - continue; - } - } - return new SystemService(systemServiceType.Value, publicIPAddress.Value, version.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemService.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemService.cs deleted file mode 100644 index 4d37065d9699..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/SystemService.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// A system service running on a compute. - public partial class SystemService - { - /// Initializes a new instance of SystemService. - internal SystemService() - { - } - - /// Initializes a new instance of SystemService. - /// The type of this system service. - /// Public IP address. - /// The version for this type. - internal SystemService(string systemServiceType, string publicIPAddress, string version) - { - SystemServiceType = systemServiceType; - PublicIPAddress = publicIPAddress; - Version = version; - } - - /// The type of this system service. - public string SystemServiceType { get; } - /// Public IP address. - public string PublicIPAddress { get; } - /// The version for this type. - public string Version { get; } - } -} 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 ab1d25c19a17..ea110cc90365 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 @@ -104,7 +104,7 @@ internal static TableVerticalFeaturizationSettings DeserializeTableVerticalFeatu Optional> blockedTransformers = default; Optional> columnNameAndTypes = default; Optional enableDnnFeaturization = default; - Optional mode = default; + Optional mode = default; Optional>> transformerParams = default; Optional datasetLanguage = default; foreach (var property in element.EnumerateObject()) @@ -163,7 +163,7 @@ internal static TableVerticalFeaturizationSettings DeserializeTableVerticalFeatu property.ThrowNonNullablePropertyIsNull(); continue; } - mode = new FeaturizationMode(property.Value.GetString()); + mode = new MachineLearningFeaturizationMode(property.Value.GetString()); continue; } if (property.NameEquals("transformerParams")) 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 2dc739868a0e..f1b74a760ec6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalFeaturizationSettings.cs @@ -10,8 +10,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Featurization Configuration. - public partial class TableVerticalFeaturizationSettings : FeaturizationSettings + /// + /// Featurization Configuration. + /// Serialized Name: TableVerticalFeaturizationSettings + /// + public partial class TableVerticalFeaturizationSettings : MachineLearningFeaturizationSettings { /// Initializes a new instance of TableVerticalFeaturizationSettings. public TableVerticalFeaturizationSettings() @@ -22,17 +25,33 @@ public TableVerticalFeaturizationSettings() } /// Initializes a new instance of TableVerticalFeaturizationSettings. - /// Dataset language, useful for the text data. - /// 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. + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// + /// + /// These transformers shall not be used in featurization. + /// Serialized Name: TableVerticalFeaturizationSettings.blockedTransformers + /// + /// + /// Dictionary of column name and its type (int, float, string, datetime etc). + /// Serialized Name: TableVerticalFeaturizationSettings.columnNameAndTypes + /// + /// + /// Determines whether to use Dnn based featurizers for data featurization. + /// Serialized Name: TableVerticalFeaturizationSettings.enableDnnFeaturization + /// /// /// 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. + /// Serialized Name: TableVerticalFeaturizationSettings.mode /// - /// 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, IList blockedTransformers, IDictionary columnNameAndTypes, bool? enableDnnFeaturization, FeaturizationMode? mode, IDictionary> transformerParams) : base(datasetLanguage) + /// + /// User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor. + /// Serialized Name: TableVerticalFeaturizationSettings.transformerParams + /// + internal TableVerticalFeaturizationSettings(string datasetLanguage, IList blockedTransformers, IDictionary columnNameAndTypes, bool? enableDnnFeaturization, MachineLearningFeaturizationMode? mode, IDictionary> transformerParams) : base(datasetLanguage) { BlockedTransformers = blockedTransformers; ColumnNameAndTypes = columnNameAndTypes; @@ -41,19 +60,32 @@ internal TableVerticalFeaturizationSettings(string datasetLanguage, IList These transformers shall not be used in featurization. + /// + /// These transformers shall not be used in featurization. + /// Serialized Name: TableVerticalFeaturizationSettings.blockedTransformers + /// public IList BlockedTransformers { get; set; } - /// Dictionary of column name and its type (int, float, string, datetime etc). + /// + /// Dictionary of column name and its type (int, float, string, datetime etc). + /// Serialized Name: TableVerticalFeaturizationSettings.columnNameAndTypes + /// public IDictionary ColumnNameAndTypes { get; set; } - /// Determines whether to use Dnn based featurizers for data featurization. + /// + /// Determines whether to use Dnn based featurizers for data featurization. + /// Serialized Name: TableVerticalFeaturizationSettings.enableDnnFeaturization + /// 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. + /// Serialized Name: TableVerticalFeaturizationSettings.mode + /// + public MachineLearningFeaturizationMode? Mode { 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. + /// Serialized Name: TableVerticalFeaturizationSettings.transformerParams /// - public FeaturizationMode? Mode { 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; } } } 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 00cdd7a38a1c..89631f9d1b0f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TableVerticalLimitSettings.cs @@ -9,7 +9,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Job execution constraints. + /// + /// Job execution constraints. + /// Serialized Name: TableVerticalLimitSettings + /// public partial class TableVerticalLimitSettings { /// Initializes a new instance of TableVerticalLimitSettings. @@ -18,13 +21,34 @@ public TableVerticalLimitSettings() } /// Initializes a new instance of TableVerticalLimitSettings. - /// 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. + /// + /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. + /// Serialized Name: TableVerticalLimitSettings.enableEarlyTermination + /// + /// + /// Exit score for the AutoML job. + /// Serialized Name: TableVerticalLimitSettings.exitScore + /// + /// + /// Maximum Concurrent iterations. + /// Serialized Name: TableVerticalLimitSettings.maxConcurrentTrials + /// + /// + /// Max cores per iteration. + /// Serialized Name: TableVerticalLimitSettings.maxCoresPerTrial + /// + /// + /// Number of iterations. + /// Serialized Name: TableVerticalLimitSettings.maxTrials + /// + /// + /// AutoML job timeout. + /// Serialized Name: TableVerticalLimitSettings.timeout + /// + /// + /// Iteration timeout. + /// Serialized Name: TableVerticalLimitSettings.trialTimeout + /// internal TableVerticalLimitSettings(bool? enableEarlyTermination, double? exitScore, int? maxConcurrentTrials, int? maxCoresPerTrial, int? maxTrials, TimeSpan? timeout, TimeSpan? trialTimeout) { EnableEarlyTermination = enableEarlyTermination; @@ -36,19 +60,40 @@ internal TableVerticalLimitSettings(bool? enableEarlyTermination, double? exitSc TrialTimeout = trialTimeout; } - /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. + /// + /// Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations. + /// Serialized Name: TableVerticalLimitSettings.enableEarlyTermination + /// public bool? EnableEarlyTermination { get; set; } - /// Exit score for the AutoML job. + /// + /// Exit score for the AutoML job. + /// Serialized Name: TableVerticalLimitSettings.exitScore + /// public double? ExitScore { get; set; } - /// Maximum Concurrent iterations. + /// + /// Maximum Concurrent iterations. + /// Serialized Name: TableVerticalLimitSettings.maxConcurrentTrials + /// public int? MaxConcurrentTrials { get; set; } - /// Max cores per iteration. + /// + /// Max cores per iteration. + /// Serialized Name: TableVerticalLimitSettings.maxCoresPerTrial + /// public int? MaxCoresPerTrial { get; set; } - /// Number of iterations. + /// + /// Number of iterations. + /// Serialized Name: TableVerticalLimitSettings.maxTrials + /// public int? MaxTrials { get; set; } - /// AutoML job timeout. + /// + /// AutoML job timeout. + /// Serialized Name: TableVerticalLimitSettings.timeout + /// public TimeSpan? Timeout { get; set; } - /// Iteration timeout. + /// + /// Iteration timeout. + /// Serialized Name: TableVerticalLimitSettings.trialTimeout + /// public TimeSpan? TrialTimeout { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetAggregationFunction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetAggregationFunction.cs index edc752d22c91..5cb9a73ae2eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetAggregationFunction.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetAggregationFunction.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Target aggregate function. + /// + /// Target aggregate function. + /// Serialized Name: TargetAggregationFunction + /// public readonly partial struct TargetAggregationFunction : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public TargetAggregationFunction(string value) private const string MinValue = "Min"; private const string MeanValue = "Mean"; - /// Represent no value set. + /// + /// Represent no value set. + /// Serialized Name: TargetAggregationFunction.None + /// public static TargetAggregationFunction None { get; } = new TargetAggregationFunction(NoneValue); - /// Sum. + /// + /// Sum + /// Serialized Name: TargetAggregationFunction.Sum + /// public static TargetAggregationFunction Sum { get; } = new TargetAggregationFunction(SumValue); - /// Max. + /// + /// Max + /// Serialized Name: TargetAggregationFunction.Max + /// public static TargetAggregationFunction Max { get; } = new TargetAggregationFunction(MaxValue); - /// Min. + /// + /// Min + /// Serialized Name: TargetAggregationFunction.Min + /// public static TargetAggregationFunction Min { get; } = new TargetAggregationFunction(MinValue); - /// Mean. + /// + /// Mean + /// Serialized Name: TargetAggregationFunction.Mean + /// public static TargetAggregationFunction Mean { get; } = new TargetAggregationFunction(MeanValue); /// Determines if two values are the same. public static bool operator ==(TargetAggregationFunction left, TargetAggregationFunction right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLags.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLags.cs index 2882cca4e571..7cbc928e2693 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLags.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLags.cs @@ -9,6 +9,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// /// The number of past periods to lag from the target column. + /// Serialized Name: TargetLags /// Please note is the base class. According to the scenario, a derived class 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 . /// @@ -20,13 +21,19 @@ protected TargetLags() } /// Initializes a new instance of TargetLags. - /// [Required] Set target lags mode - Auto/Custom. + /// + /// [Required] Set target lags mode - Auto/Custom + /// Serialized Name: TargetLags.mode + /// internal TargetLags(TargetLagsMode mode) { Mode = mode; } - /// [Required] Set target lags mode - Auto/Custom. + /// + /// [Required] Set target lags mode - Auto/Custom + /// Serialized Name: TargetLags.mode + /// internal TargetLagsMode Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLagsMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLagsMode.cs index be2b5aed3914..6c3dc7ac56da 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLagsMode.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetLagsMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Target lags selection modes. + /// + /// Target lags selection modes. + /// Serialized Name: TargetLagsMode + /// internal readonly partial struct TargetLagsMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public TargetLagsMode(string value) private const string AutoValue = "Auto"; private const string CustomValue = "Custom"; - /// Target lags to be determined automatically. + /// + /// Target lags to be determined automatically. + /// Serialized Name: TargetLagsMode.Auto + /// public static TargetLagsMode Auto { get; } = new TargetLagsMode(AutoValue); - /// Use the custom target lags. + /// + /// Use the custom target lags. + /// Serialized Name: TargetLagsMode.Custom + /// public static TargetLagsMode Custom { get; } = new TargetLagsMode(CustomValue); /// Determines if two values are the same. public static bool operator ==(TargetLagsMode left, TargetLagsMode right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSize.cs index 406f7ff11dd8..ca0da01a1a55 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSize.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSize.cs @@ -9,6 +9,7 @@ namespace Azure.ResourceManager.MachineLearning.Models { /// /// Forecasting target rolling window size. + /// Serialized Name: TargetRollingWindowSize /// Please note is the base class. According to the scenario, a derived class 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 . /// @@ -20,13 +21,19 @@ protected TargetRollingWindowSize() } /// Initializes a new instance of TargetRollingWindowSize. - /// [Required] TargetRollingWindowSiz detection mode. + /// + /// [Required] TargetRollingWindowSiz detection mode. + /// Serialized Name: TargetRollingWindowSize.mode + /// internal TargetRollingWindowSize(TargetRollingWindowSizeMode mode) { Mode = mode; } - /// [Required] TargetRollingWindowSiz detection mode. + /// + /// [Required] TargetRollingWindowSiz detection mode. + /// Serialized Name: TargetRollingWindowSize.mode + /// internal TargetRollingWindowSizeMode Mode { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSizeMode.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSizeMode.cs index cdb3de62b1d2..781a9c085a75 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSizeMode.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetRollingWindowSizeMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Target rolling windows size mode. + /// + /// Target rolling windows size mode. + /// Serialized Name: TargetRollingWindowSizeMode + /// internal readonly partial struct TargetRollingWindowSizeMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public TargetRollingWindowSizeMode(string value) private const string AutoValue = "Auto"; private const string CustomValue = "Custom"; - /// Determine rolling windows size automatically. + /// + /// Determine rolling windows size automatically. + /// Serialized Name: TargetRollingWindowSizeMode.Auto + /// public static TargetRollingWindowSizeMode Auto { get; } = new TargetRollingWindowSizeMode(AutoValue); - /// Use the specified rolling window size. + /// + /// Use the specified rolling window size. + /// Serialized Name: TargetRollingWindowSizeMode.Custom + /// public static TargetRollingWindowSizeMode Custom { get; } = new TargetRollingWindowSizeMode(CustomValue); /// Determines if two values are the same. public static bool operator ==(TargetRollingWindowSizeMode left, TargetRollingWindowSizeMode right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetUtilizationScaleSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetUtilizationScaleSettings.Serialization.cs deleted file mode 100644 index a6cbbc56b5d6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetUtilizationScaleSettings.Serialization.cs +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class TargetUtilizationScaleSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(MaxInstances)) - { - writer.WritePropertyName("maxInstances"); - writer.WriteNumberValue(MaxInstances.Value); - } - if (Optional.IsDefined(MinInstances)) - { - writer.WritePropertyName("minInstances"); - writer.WriteNumberValue(MinInstances.Value); - } - if (Optional.IsDefined(PollingInterval)) - { - writer.WritePropertyName("pollingInterval"); - writer.WriteStringValue(PollingInterval.Value, "P"); - } - if (Optional.IsDefined(TargetUtilizationPercentage)) - { - writer.WritePropertyName("targetUtilizationPercentage"); - writer.WriteNumberValue(TargetUtilizationPercentage.Value); - } - writer.WritePropertyName("scaleType"); - writer.WriteStringValue(ScaleType.ToString()); - writer.WriteEndObject(); - } - - internal static TargetUtilizationScaleSettings DeserializeTargetUtilizationScaleSettings(JsonElement element) - { - Optional maxInstances = default; - Optional minInstances = default; - Optional pollingInterval = default; - Optional targetUtilizationPercentage = default; - ScaleType scaleType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("maxInstances")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxInstances = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("minInstances")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - minInstances = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("pollingInterval")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - pollingInterval = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("targetUtilizationPercentage")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - targetUtilizationPercentage = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("scaleType")) - { - scaleType = new ScaleType(property.Value.GetString()); - continue; - } - } - return new TargetUtilizationScaleSettings(scaleType, Optional.ToNullable(maxInstances), Optional.ToNullable(minInstances), Optional.ToNullable(pollingInterval), Optional.ToNullable(targetUtilizationPercentage)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetUtilizationScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetUtilizationScaleSettings.cs deleted file mode 100644 index 594d77830e32..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TargetUtilizationScaleSettings.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The TargetUtilizationScaleSettings. - public partial class TargetUtilizationScaleSettings : OnlineScaleSettings - { - /// Initializes a new instance of TargetUtilizationScaleSettings. - public TargetUtilizationScaleSettings() - { - ScaleType = ScaleType.TargetUtilization; - } - - /// Initializes a new instance of TargetUtilizationScaleSettings. - /// [Required] Type of deployment scaling algorithm. - /// 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 TargetUtilizationScaleSettings(ScaleType scaleType, int? maxInstances, int? minInstances, TimeSpan? pollingInterval, int? targetUtilizationPercentage) : base(scaleType) - { - MaxInstances = maxInstances; - MinInstances = minInstances; - PollingInterval = pollingInterval; - TargetUtilizationPercentage = targetUtilizationPercentage; - 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; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TaskType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TaskType.cs index e23468a9d5bb..2e1791ec17f1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TaskType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TaskType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// AutoMLJob Task type. + /// + /// AutoMLJob Task type. + /// Serialized Name: TaskType + /// internal readonly partial struct TaskType : IEquatable { private readonly string _value; @@ -36,45 +39,59 @@ public TaskType(string value) /// /// Classification in machine learning and statistics is a supervised learning approach in which /// the computer program learns from the data given to it and make new observations or classifications. + /// Serialized Name: TaskType.Classification /// public static TaskType Classification { get; } = new TaskType(ClassificationValue); - /// Regression means to predict the value using the input data. Regression models are used to predict a continuous value. + /// + /// Regression means to predict the value using the input data. Regression models are used to predict a continuous value. + /// Serialized Name: TaskType.Regression + /// public static TaskType Regression { get; } = new TaskType(RegressionValue); /// /// Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model /// that can be used to predict the near future values based on the inputs. + /// Serialized Name: TaskType.Forecasting /// public static TaskType Forecasting { get; } = new TaskType(ForecastingValue); /// /// Image Classification. Multi-class image classification is used when an image is classified with only a single label /// from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. + /// Serialized Name: TaskType.ImageClassification /// public static TaskType ImageClassification { get; } = new TaskType(ImageClassificationValue); /// /// Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels /// from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. + /// Serialized Name: TaskType.ImageClassificationMultilabel /// public static TaskType ImageClassificationMultilabel { get; } = new TaskType(ImageClassificationMultilabelValue); /// /// Image Object Detection. Object detection is used to identify objects in an image and locate each object with a /// bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. + /// Serialized Name: TaskType.ImageObjectDetection /// public static TaskType ImageObjectDetection { get; } = new TaskType(ImageObjectDetectionValue); /// /// Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, /// drawing a polygon around each object in the image. + /// Serialized Name: TaskType.ImageInstanceSegmentation /// public static TaskType ImageInstanceSegmentation { get; } = new TaskType(ImageInstanceSegmentationValue); /// /// Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. /// Categories are mutually exclusive. + /// Serialized Name: TaskType.TextClassification /// public static TaskType TextClassification { get; } = new TaskType(TextClassificationValue); - /// Multilabel classification task assigns each sample to a group (zero or more) of target labels. + /// + /// Multilabel classification task assigns each sample to a group (zero or more) of target labels. + /// Serialized Name: TaskType.TextClassificationMultilabel + /// public static TaskType TextClassificationMultilabel { get; } = new TaskType(TextClassificationMultilabelValue); /// /// Text Named Entity Recognition a.k.a. TextNER. /// Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. + /// Serialized Name: TaskType.TextNER /// public static TaskType TextNER { get; } = new TaskType(TextNERValue); /// Determines if two values are the same. diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlow.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlow.Serialization.cs deleted file mode 100644 index 48d4d9332ef2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlow.Serialization.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class TensorFlow : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ParameterServerCount)) - { - writer.WritePropertyName("parameterServerCount"); - writer.WriteNumberValue(ParameterServerCount.Value); - } - if (Optional.IsDefined(WorkerCount)) - { - if (WorkerCount != null) - { - writer.WritePropertyName("workerCount"); - writer.WriteNumberValue(WorkerCount.Value); - } - else - { - writer.WriteNull("workerCount"); - } - } - writer.WritePropertyName("distributionType"); - writer.WriteStringValue(DistributionType.ToString()); - writer.WriteEndObject(); - } - - internal static TensorFlow DeserializeTensorFlow(JsonElement element) - { - Optional parameterServerCount = default; - Optional workerCount = default; - DistributionType distributionType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("parameterServerCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - parameterServerCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("workerCount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - workerCount = null; - continue; - } - workerCount = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("distributionType")) - { - distributionType = new DistributionType(property.Value.GetString()); - continue; - } - } - return new TensorFlow(distributionType, Optional.ToNullable(parameterServerCount), Optional.ToNullable(workerCount)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlow.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlow.cs deleted file mode 100644 index 422695c68556..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlow.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// TensorFlow distribution configuration. - public partial class TensorFlow : DistributionConfiguration - { - /// Initializes a new instance of TensorFlow. - public TensorFlow() - { - DistributionType = DistributionType.TensorFlow; - } - - /// Initializes a new instance of TensorFlow. - /// [Required] Specifies the type of distribution framework. - /// Number of parameter server tasks. - /// Number of workers. If not specified, will default to the instance count. - internal TensorFlow(DistributionType distributionType, int? parameterServerCount, int? workerCount) : base(distributionType) - { - ParameterServerCount = parameterServerCount; - WorkerCount = workerCount; - 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; } - } -} 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 new file mode 100644 index 000000000000..48cbd9ea1a94 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.MachineLearning.Models +{ + public partial class TensorFlowDistributionConfiguration : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ParameterServerCount)) + { + writer.WritePropertyName("parameterServerCount"); + writer.WriteNumberValue(ParameterServerCount.Value); + } + if (Optional.IsDefined(WorkerCount)) + { + if (WorkerCount != null) + { + writer.WritePropertyName("workerCount"); + writer.WriteNumberValue(WorkerCount.Value); + } + else + { + writer.WriteNull("workerCount"); + } + } + writer.WritePropertyName("distributionType"); + writer.WriteStringValue(DistributionType.ToString()); + writer.WriteEndObject(); + } + + internal static TensorFlowDistributionConfiguration DeserializeTensorFlowDistributionConfiguration(JsonElement element) + { + Optional parameterServerCount = default; + Optional workerCount = default; + DistributionType distributionType = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameterServerCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + parameterServerCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("workerCount")) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + workerCount = null; + continue; + } + workerCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("distributionType")) + { + distributionType = new DistributionType(property.Value.GetString()); + continue; + } + } + return new TensorFlowDistributionConfiguration(distributionType, Optional.ToNullable(parameterServerCount), Optional.ToNullable(workerCount)); + } + } +} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs new file mode 100644 index 000000000000..6a9e5e6bcd79 --- /dev/null +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TensorFlowDistributionConfiguration.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.ResourceManager.MachineLearning.Models +{ + /// + /// TensorFlow distribution configuration. + /// Serialized Name: TensorFlow + /// + public partial class TensorFlowDistributionConfiguration : MachineLearningDistributionConfiguration + { + /// Initializes a new instance of TensorFlowDistributionConfiguration. + public TensorFlowDistributionConfiguration() + { + DistributionType = DistributionType.TensorFlow; + } + + /// Initializes a new instance of TensorFlowDistributionConfiguration. + /// + /// [Required] Specifies the type of distribution framework. + /// Serialized Name: DistributionConfiguration.distributionType + /// + /// + /// Number of parameter server tasks. + /// Serialized Name: TensorFlow.parameterServerCount + /// + /// + /// Number of workers. If not specified, will default to the instance count. + /// Serialized Name: TensorFlow.workerCount + /// + internal TensorFlowDistributionConfiguration(DistributionType distributionType, int? parameterServerCount, int? workerCount) : base(distributionType) + { + ParameterServerCount = parameterServerCount; + WorkerCount = workerCount; + DistributionType = distributionType; + } + + /// + /// Number of parameter server tasks. + /// Serialized Name: TensorFlow.parameterServerCount + /// + public int? ParameterServerCount { get; set; } + /// + /// Number of workers. If not specified, will default to the instance count. + /// Serialized Name: TensorFlow.workerCount + /// + public int? WorkerCount { 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 a5ad163ede39..7af75cd25d5f 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 @@ -85,11 +85,11 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele Optional primaryMetric = default; Optional featurizationSettings = default; Optional limitSettings = default; - Optional validationData = default; - Optional logVerbosity = default; + Optional validationData = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -129,7 +129,7 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("logVerbosity")) @@ -139,7 +139,7 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -159,7 +159,7 @@ internal static TextClassification DeserializeTextClassification(JsonElement ele } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 6989c6aa888b..c1481091197d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassification.cs @@ -13,13 +13,17 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Text Classification task in AutoML NLP vertical. /// NLP - Natural Language Processing. + /// Serialized Name: TextClassification /// public partial class TextClassification : AutoMLVertical { /// Initializes a new instance of TextClassification. - /// [Required] Training data input. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// /// is null. - public TextClassification(MLTableJobInput trainingData) : base(trainingData) + public TextClassification(MachineLearningTableJobInput trainingData) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); @@ -27,18 +31,40 @@ public TextClassification(MLTableJobInput trainingData) : base(trainingData) } /// Initializes a new instance of TextClassification. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// + /// + /// Primary metric for Text-Classification task. + /// Serialized Name: TextClassification.primaryMetric + /// + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: NlpVertical.featurizationSettings + /// + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: NlpVertical.limitSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: NlpVertical.validationData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - /// Primary metric for Text-Classification task. - /// Featurization inputs needed for AutoML job. - /// Execution constraints for AutoMLJob. - /// Validation data inputs. - internal TextClassification(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MLTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal TextClassification(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; FeaturizationSettings = featurizationSettings; @@ -47,11 +73,20 @@ internal TextClassification(LogVerbosity? logVerbosity, string targetColumnName, TaskType = taskType; } - /// Primary metric for Text-Classification task. + /// + /// Primary metric for Text-Classification task. + /// Serialized Name: TextClassification.primaryMetric + /// public ClassificationPrimaryMetric? PrimaryMetric { get; set; } - /// Featurization inputs needed for AutoML job. + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: NlpVertical.featurizationSettings + /// internal NlpVerticalFeaturizationSettings FeaturizationSettings { get; set; } - /// Dataset language, useful for the text data. + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// public string FeaturizationDatasetLanguage { get => FeaturizationSettings is null ? default : FeaturizationSettings.DatasetLanguage; @@ -63,9 +98,15 @@ public string FeaturizationDatasetLanguage } } - /// Execution constraints for AutoMLJob. + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: NlpVertical.limitSettings + /// public NlpVerticalLimitSettings LimitSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: NlpVertical.validationData + /// + 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 ea0b81771ec8..df63d462c0c8 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 @@ -80,11 +80,11 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil Optional primaryMetric = default; Optional featurizationSettings = default; Optional limitSettings = default; - Optional validationData = default; - Optional logVerbosity = default; + Optional validationData = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -124,7 +124,7 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("logVerbosity")) @@ -134,7 +134,7 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -154,7 +154,7 @@ internal static TextClassificationMultilabel DeserializeTextClassificationMultil } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 f24114b6a4b2..a06790df9cf8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextClassificationMultilabel.cs @@ -13,13 +13,17 @@ namespace Azure.ResourceManager.MachineLearning.Models /// /// Text Classification Multilabel task in AutoML NLP vertical. /// NLP - Natural Language Processing. + /// Serialized Name: TextClassificationMultilabel /// public partial class TextClassificationMultilabel : AutoMLVertical { /// Initializes a new instance of TextClassificationMultilabel. - /// [Required] Training data input. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// /// is null. - public TextClassificationMultilabel(MLTableJobInput trainingData) : base(trainingData) + public TextClassificationMultilabel(MachineLearningTableJobInput trainingData) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); @@ -27,21 +31,41 @@ public TextClassificationMultilabel(MLTableJobInput trainingData) : base(trainin } /// Initializes a new instance of TextClassificationMultilabel. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData /// - /// [Required] Task type for AutoMLJob. - /// [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. + /// Serialized Name: TextClassificationMultilabel.primaryMetric /// - /// Featurization inputs needed for AutoML job. - /// Execution constraints for AutoMLJob. - /// Validation data inputs. - internal TextClassificationMultilabel(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ClassificationMultilabelPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MLTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: NlpVertical.featurizationSettings + /// + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: NlpVertical.limitSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: NlpVertical.validationData + /// + internal TextClassificationMultilabel(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationMultilabelPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; FeaturizationSettings = featurizationSettings; @@ -53,11 +77,18 @@ internal TextClassificationMultilabel(LogVerbosity? logVerbosity, string targetC /// /// Primary metric for Text-Classification-Multilabel task. /// Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. + /// Serialized Name: TextClassificationMultilabel.primaryMetric /// public ClassificationMultilabelPrimaryMetric? PrimaryMetric { get; } - /// Featurization inputs needed for AutoML job. + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: NlpVertical.featurizationSettings + /// internal NlpVerticalFeaturizationSettings FeaturizationSettings { get; set; } - /// Dataset language, useful for the text data. + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// public string FeaturizationDatasetLanguage { get => FeaturizationSettings is null ? default : FeaturizationSettings.DatasetLanguage; @@ -69,9 +100,15 @@ public string FeaturizationDatasetLanguage } } - /// Execution constraints for AutoMLJob. + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: NlpVertical.limitSettings + /// public NlpVerticalLimitSettings LimitSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: NlpVertical.validationData + /// + 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 ab1e76b10d4f..05d9743c8e6f 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 @@ -80,11 +80,11 @@ internal static TextNer DeserializeTextNer(JsonElement element) Optional primaryMetric = default; Optional featurizationSettings = default; Optional limitSettings = default; - Optional validationData = default; - Optional logVerbosity = default; + Optional validationData = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = default; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("primaryMetric")) @@ -124,7 +124,7 @@ internal static TextNer DeserializeTextNer(JsonElement element) validationData = null; continue; } - validationData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + validationData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } if (property.NameEquals("logVerbosity")) @@ -134,7 +134,7 @@ internal static TextNer DeserializeTextNer(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -154,7 +154,7 @@ internal static TextNer DeserializeTextNer(JsonElement element) } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 16c3c4a1f292..d4fbe2e136f3 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TextNer.cs @@ -14,13 +14,17 @@ namespace Azure.ResourceManager.MachineLearning.Models /// Text-NER task in AutoML NLP vertical. /// NER - Named Entity Recognition. /// NLP - Natural Language Processing. + /// Serialized Name: TextNer /// public partial class TextNer : AutoMLVertical { /// Initializes a new instance of TextNer. - /// [Required] Training data input. + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData + /// /// is null. - public TextNer(MLTableJobInput trainingData) : base(trainingData) + public TextNer(MachineLearningTableJobInput trainingData) : base(trainingData) { Argument.AssertNotNull(trainingData, nameof(trainingData)); @@ -28,21 +32,41 @@ public TextNer(MLTableJobInput trainingData) : base(trainingData) } /// Initializes a new instance of TextNer. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. /// /// Primary metric for Text-NER task. /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + /// Serialized Name: TextNer.primaryMetric /// - /// Featurization inputs needed for AutoML job. - /// Execution constraints for AutoMLJob. - /// Validation data inputs. - internal TextNer(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MLTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: NlpVertical.featurizationSettings + /// + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: NlpVertical.limitSettings + /// + /// + /// Validation data inputs. + /// Serialized Name: NlpVertical.validationData + /// + internal TextNer(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData, ClassificationPrimaryMetric? primaryMetric, NlpVerticalFeaturizationSettings featurizationSettings, NlpVerticalLimitSettings limitSettings, MachineLearningTableJobInput validationData) : base(logVerbosity, targetColumnName, taskType, trainingData) { PrimaryMetric = primaryMetric; FeaturizationSettings = featurizationSettings; @@ -54,11 +78,18 @@ internal TextNer(LogVerbosity? logVerbosity, string targetColumnName, TaskType t /// /// Primary metric for Text-NER task. /// Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. + /// Serialized Name: TextNer.primaryMetric /// public ClassificationPrimaryMetric? PrimaryMetric { get; } - /// Featurization inputs needed for AutoML job. + /// + /// Featurization inputs needed for AutoML job. + /// Serialized Name: NlpVertical.featurizationSettings + /// internal NlpVerticalFeaturizationSettings FeaturizationSettings { get; set; } - /// Dataset language, useful for the text data. + /// + /// Dataset language, useful for the text data. + /// Serialized Name: FeaturizationSettings.datasetLanguage + /// public string FeaturizationDatasetLanguage { get => FeaturizationSettings is null ? default : FeaturizationSettings.DatasetLanguage; @@ -70,9 +101,15 @@ public string FeaturizationDatasetLanguage } } - /// Execution constraints for AutoMLJob. + /// + /// Execution constraints for AutoMLJob. + /// Serialized Name: NlpVertical.limitSettings + /// public NlpVerticalLimitSettings LimitSettings { get; set; } - /// Validation data inputs. - public MLTableJobInput ValidationData { get; set; } + /// + /// Validation data inputs. + /// Serialized Name: NlpVertical.validationData + /// + public MachineLearningTableJobInput ValidationData { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingSettings.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingSettings.Serialization.cs deleted file mode 100644 index 7d4c47597f97..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingSettings.Serialization.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class TrainingSettings : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EnableDnnTraining)) - { - writer.WritePropertyName("enableDnnTraining"); - writer.WriteBooleanValue(EnableDnnTraining.Value); - } - if (Optional.IsDefined(EnableModelExplainability)) - { - writer.WritePropertyName("enableModelExplainability"); - writer.WriteBooleanValue(EnableModelExplainability.Value); - } - if (Optional.IsDefined(EnableOnnxCompatibleModels)) - { - writer.WritePropertyName("enableOnnxCompatibleModels"); - writer.WriteBooleanValue(EnableOnnxCompatibleModels.Value); - } - if (Optional.IsDefined(EnableStackEnsemble)) - { - writer.WritePropertyName("enableStackEnsemble"); - writer.WriteBooleanValue(EnableStackEnsemble.Value); - } - if (Optional.IsDefined(EnableVoteEnsemble)) - { - writer.WritePropertyName("enableVoteEnsemble"); - writer.WriteBooleanValue(EnableVoteEnsemble.Value); - } - if (Optional.IsDefined(EnsembleModelDownloadTimeout)) - { - writer.WritePropertyName("ensembleModelDownloadTimeout"); - writer.WriteStringValue(EnsembleModelDownloadTimeout.Value, "P"); - } - if (Optional.IsDefined(StackEnsembleSettings)) - { - if (StackEnsembleSettings != null) - { - writer.WritePropertyName("stackEnsembleSettings"); - writer.WriteObjectValue(StackEnsembleSettings); - } - else - { - writer.WriteNull("stackEnsembleSettings"); - } - } - writer.WriteEndObject(); - } - - internal static TrainingSettings DeserializeTrainingSettings(JsonElement element) - { - Optional enableDnnTraining = default; - Optional enableModelExplainability = default; - Optional enableOnnxCompatibleModels = default; - Optional enableStackEnsemble = default; - Optional enableVoteEnsemble = default; - Optional ensembleModelDownloadTimeout = default; - Optional stackEnsembleSettings = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("enableDnnTraining")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableDnnTraining = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enableModelExplainability")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableModelExplainability = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enableOnnxCompatibleModels")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableOnnxCompatibleModels = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enableStackEnsemble")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableStackEnsemble = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("enableVoteEnsemble")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - enableVoteEnsemble = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("ensembleModelDownloadTimeout")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - ensembleModelDownloadTimeout = property.Value.GetTimeSpan("P"); - continue; - } - if (property.NameEquals("stackEnsembleSettings")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - stackEnsembleSettings = null; - continue; - } - stackEnsembleSettings = StackEnsembleSettings.DeserializeStackEnsembleSettings(property.Value); - continue; - } - } - return new TrainingSettings(Optional.ToNullable(enableDnnTraining), Optional.ToNullable(enableModelExplainability), Optional.ToNullable(enableOnnxCompatibleModels), Optional.ToNullable(enableStackEnsemble), Optional.ToNullable(enableVoteEnsemble), Optional.ToNullable(ensembleModelDownloadTimeout), stackEnsembleSettings.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingSettings.cs deleted file mode 100644 index b4b45c109f4d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrainingSettings.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Training related configuration. - public partial class TrainingSettings - { - /// Initializes a new instance of TrainingSettings. - public TrainingSettings() - { - } - - /// Initializes a new instance of TrainingSettings. - /// Enable recommendation of DNN models. - /// Flag to turn on explainability on best model. - /// Flag for enabling onnx compatible models. - /// 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. - internal TrainingSettings(bool? enableDnnTraining, bool? enableModelExplainability, bool? enableOnnxCompatibleModels, bool? enableStackEnsemble, bool? enableVoteEnsemble, TimeSpan? ensembleModelDownloadTimeout, StackEnsembleSettings stackEnsembleSettings) - { - EnableDnnTraining = enableDnnTraining; - EnableModelExplainability = enableModelExplainability; - EnableOnnxCompatibleModels = enableOnnxCompatibleModels; - EnableStackEnsemble = enableStackEnsemble; - EnableVoteEnsemble = enableVoteEnsemble; - EnsembleModelDownloadTimeout = ensembleModelDownloadTimeout; - StackEnsembleSettings = stackEnsembleSettings; - } - - /// Enable recommendation of DNN models. - public bool? EnableDnnTraining { get; set; } - /// Flag to turn on explainability on best model. - public bool? EnableModelExplainability { get; set; } - /// Flag for enabling onnx compatible models. - public bool? EnableOnnxCompatibleModels { get; set; } - /// Enable stack ensemble run. - public bool? EnableStackEnsemble { get; set; } - /// Enable voting ensemble run. - public bool? EnableVoteEnsemble { get; set; } - /// - /// 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. - /// - public TimeSpan? EnsembleModelDownloadTimeout { get; set; } - /// Stack ensemble settings for stack ensemble run. - public StackEnsembleSettings StackEnsembleSettings { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.Serialization.cs index ff0e1fca225b..21a3712ccc42 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.Serialization.cs @@ -74,10 +74,10 @@ internal static TrialComponent DeserializeTrialComponent(JsonElement element) { Optional codeId = default; string command = default; - Optional distribution = default; + Optional distribution = default; string environmentId = default; Optional> environmentVariables = default; - Optional resources = default; + Optional resources = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("codeId")) @@ -102,7 +102,7 @@ internal static TrialComponent DeserializeTrialComponent(JsonElement element) distribution = null; continue; } - distribution = DistributionConfiguration.DeserializeDistributionConfiguration(property.Value); + distribution = MachineLearningDistributionConfiguration.DeserializeMachineLearningDistributionConfiguration(property.Value); continue; } if (property.NameEquals("environmentId")) @@ -139,7 +139,7 @@ internal static TrialComponent DeserializeTrialComponent(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - resources = JobResourceConfiguration.DeserializeJobResourceConfiguration(property.Value); + resources = MachineLearningJobResourceConfiguration.DeserializeMachineLearningJobResourceConfiguration(property.Value); continue; } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.cs index 08140dfe9c92..ea8be666c4b9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TrialComponent.cs @@ -11,12 +11,21 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Trial component definition. + /// + /// Trial component definition. + /// Serialized Name: TrialComponent + /// public partial class TrialComponent { /// Initializes a new instance of TrialComponent. - /// [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. + /// + /// [Required] The command to execute on startup of the job. eg. "python train.py" + /// Serialized Name: TrialComponent.command + /// + /// + /// [Required] The ARM resource ID of the Environment specification for the job. + /// Serialized Name: TrialComponent.environmentId + /// /// or is null. public TrialComponent(string command, string environmentId) { @@ -29,17 +38,33 @@ public TrialComponent(string command, string environmentId) } /// Initializes a new instance of TrialComponent. - /// ARM resource ID of the code asset. - /// [Required] The command to execute on startup of the job. eg. "python train.py". + /// + /// ARM resource ID of the code asset. + /// Serialized Name: TrialComponent.codeId + /// + /// + /// [Required] The command to execute on startup of the job. eg. "python train.py" + /// Serialized Name: TrialComponent.command + /// /// /// 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 . + /// Serialized Name: TrialComponent.distribution + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: TrialComponent.environmentId /// - /// [Required] The ARM resource ID of the Environment specification for the job. - /// Environment variables included in the job. - /// Compute Resource configuration for the job. - internal TrialComponent(string codeId, string command, DistributionConfiguration distribution, string environmentId, IDictionary environmentVariables, JobResourceConfiguration resources) + /// + /// Environment variables included in the job. + /// Serialized Name: TrialComponent.environmentVariables + /// + /// + /// Compute Resource configuration for the job. + /// Serialized Name: TrialComponent.resources + /// + internal TrialComponent(string codeId, string command, MachineLearningDistributionConfiguration distribution, string environmentId, IDictionary environmentVariables, MachineLearningJobResourceConfiguration resources) { CodeId = codeId; Command = command; @@ -49,21 +74,37 @@ internal TrialComponent(string codeId, string command, DistributionConfiguration Resources = resources; } - /// ARM resource ID of the code asset. + /// + /// ARM resource ID of the code asset. + /// Serialized Name: TrialComponent.codeId + /// public string CodeId { get; set; } - /// [Required] The command to execute on startup of the job. eg. "python train.py". + /// + /// [Required] The command to execute on startup of the job. eg. "python train.py" + /// Serialized Name: TrialComponent.command + /// 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 . + /// Serialized Name: TrialComponent.distribution + /// Please note is the base class. According to the scenario, a derived class 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. + /// Serialized Name: TrialComponent.environmentId /// - public DistributionConfiguration Distribution { get; set; } - /// [Required] The ARM resource ID of the Environment specification for the job. public string EnvironmentId { get; set; } - /// Environment variables included in the job. + /// + /// Environment variables included in the job. + /// Serialized Name: TrialComponent.environmentVariables + /// public IDictionary EnvironmentVariables { get; set; } - /// Compute Resource configuration for the job. - public JobResourceConfiguration Resources { get; set; } + /// + /// Compute Resource configuration for the job. + /// Serialized Name: TrialComponent.resources + /// + public MachineLearningJobResourceConfiguration Resources { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerBase.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerBase.Serialization.cs deleted file mode 100644 index 23be8324b1cd..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerBase.Serialization.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class TriggerBase : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(EndTime)) - { - if (EndTime != null) - { - writer.WritePropertyName("endTime"); - writer.WriteStringValue(EndTime); - } - else - { - writer.WriteNull("endTime"); - } - } - if (Optional.IsDefined(StartTime)) - { - if (StartTime != null) - { - writer.WritePropertyName("startTime"); - writer.WriteStringValue(StartTime); - } - else - { - writer.WriteNull("startTime"); - } - } - if (Optional.IsDefined(TimeZone)) - { - writer.WritePropertyName("timeZone"); - writer.WriteStringValue(TimeZone); - } - writer.WritePropertyName("triggerType"); - writer.WriteStringValue(TriggerType.ToString()); - writer.WriteEndObject(); - } - - internal static TriggerBase DeserializeTriggerBase(JsonElement element) - { - if (element.TryGetProperty("triggerType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Cron": return CronTrigger.DeserializeCronTrigger(element); - case "Recurrence": return RecurrenceTrigger.DeserializeRecurrenceTrigger(element); - } - } - return UnknownTriggerBase.DeserializeUnknownTriggerBase(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerBase.cs deleted file mode 100644 index c7bc8a248404..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerBase.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// The TriggerBase. - /// Please note is the base class. According to the scenario, a derived class 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 TriggerBase - { - /// Initializes a new instance of TriggerBase. - protected TriggerBase() - { - } - - /// Initializes a new instance of TriggerBase. - /// - /// 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" - /// If not present, the schedule will run indefinitely - /// - /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - /// - /// 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]. - internal TriggerBase(string endTime, string startTime, string timeZone, TriggerType triggerType) - { - EndTime = endTime; - StartTime = startTime; - TimeZone = timeZone; - TriggerType = triggerType; - } - - /// - /// 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" - /// If not present, the schedule will run indefinitely - /// - public string EndTime { get; set; } - /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - public string StartTime { get; set; } - /// - /// 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 - /// - public string TimeZone { get; set; } - /// [Required]. - internal TriggerType TriggerType { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerType.cs deleted file mode 100644 index ee1d8c19af2e..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TriggerType.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 TriggerType. - public readonly partial struct TriggerType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TriggerType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string RecurrenceValue = "Recurrence"; - private const string CronValue = "Cron"; - - /// Recurrence. - public static TriggerType Recurrence { get; } = new TriggerType(RecurrenceValue); - /// Cron. - public static TriggerType Cron { get; } = new TriggerType(CronValue); - /// Determines if two values are the same. - public static bool operator ==(TriggerType left, TriggerType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TriggerType left, TriggerType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator TriggerType(string value) => new TriggerType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TriggerType other && Equals(other); - /// - public bool Equals(TriggerType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobInput.Serialization.cs deleted file mode 100644 index df6c38748221..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobInput.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class TritonModelJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static TritonModelJobInput DeserializeTritonModelJobInput(JsonElement element) - { - Optional mode = default; - Uri uri = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new InputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new TritonModelJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobInput.cs deleted file mode 100644 index 4b370f1888af..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The TritonModelJobInput. - public partial class TritonModelJobInput : JobInput - { - /// Initializes a new instance of TritonModelJobInput. - /// [Required] Input Asset URI. - /// is null. - public TritonModelJobInput(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - JobInputType = JobInputType.TritonModel; - } - - /// Initializes a new instance of TritonModelJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// Input Asset Delivery Mode. - /// [Required] Input Asset URI. - internal TritonModelJobInput(string description, JobInputType jobInputType, InputDeliveryMode? mode, Uri uri) : base(description, jobInputType) - { - Mode = mode; - Uri = uri; - JobInputType = jobInputType; - } - - /// Input Asset Delivery Mode. - public InputDeliveryMode? Mode { get; set; } - /// [Required] Input Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobOutput.Serialization.cs deleted file mode 100644 index 89155fa53157..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobOutput.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class TritonModelJobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - if (Uri != null) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static TritonModelJobOutput DeserializeTritonModelJobOutput(JsonElement element) - { - Optional mode = default; - Optional uri = default; - Optional description = default; - JobOutputType jobOutputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new OutputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobOutputType")) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } - } - return new TritonModelJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobOutput.cs deleted file mode 100644 index f0e63d455e81..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TritonModelJobOutput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The TritonModelJobOutput. - public partial class TritonModelJobOutput : JobOutput - { - /// Initializes a new instance of TritonModelJobOutput. - public TritonModelJobOutput() - { - JobOutputType = JobOutputType.TritonModel; - } - - /// Initializes a new instance of TritonModelJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - /// Output Asset Delivery Mode. - /// Output Asset URI. - internal TritonModelJobOutput(string description, JobOutputType jobOutputType, OutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) - { - Mode = mode; - Uri = uri; - JobOutputType = jobOutputType; - } - - /// Output Asset Delivery Mode. - public OutputDeliveryMode? Mode { get; set; } - /// Output Asset URI. - public Uri Uri { get; set; } - } -} 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 ab8e0d28c140..a1d232acc64e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/TruncationSelectionPolicy.cs @@ -7,8 +7,11 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. - public partial class TruncationSelectionPolicy : EarlyTerminationPolicy + /// + /// Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. + /// Serialized Name: TruncationSelectionPolicy + /// + public partial class TruncationSelectionPolicy : MachineLearningEarlyTerminationPolicy { /// Initializes a new instance of TruncationSelectionPolicy. public TruncationSelectionPolicy() @@ -17,17 +20,32 @@ public TruncationSelectionPolicy() } /// Initializes a new instance of TruncationSelectionPolicy. - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. - /// [Required] Name of policy configuration. - /// The percentage of runs to cancel at each evaluation interval. + /// + /// Number of intervals by which to delay the first evaluation. + /// Serialized Name: EarlyTerminationPolicy.delayEvaluation + /// + /// + /// Interval (number of runs) between policy evaluations. + /// Serialized Name: EarlyTerminationPolicy.evaluationInterval + /// + /// + /// [Required] Name of policy configuration + /// Serialized Name: EarlyTerminationPolicy.policyType + /// + /// + /// The percentage of runs to cancel at each evaluation interval. + /// Serialized Name: TruncationSelectionPolicy.truncationPercentage + /// internal TruncationSelectionPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType, int? truncationPercentage) : base(delayEvaluation, evaluationInterval, policyType) { TruncationPercentage = truncationPercentage; PolicyType = policyType; } - /// The percentage of runs to cancel at each evaluation interval. + /// + /// The percentage of runs to cancel at each evaluation interval. + /// Serialized Name: TruncationSelectionPolicy.truncationPercentage + /// public int? TruncationPercentage { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnderlyingResourceAction.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnderlyingResourceAction.cs deleted file mode 100644 index fd4be6945240..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnderlyingResourceAction.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 UnderlyingResourceAction. - public readonly partial struct UnderlyingResourceAction : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UnderlyingResourceAction(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DeleteValue = "Delete"; - private const string DetachValue = "Detach"; - - /// Delete. - public static UnderlyingResourceAction Delete { get; } = new UnderlyingResourceAction(DeleteValue); - /// Detach. - public static UnderlyingResourceAction Detach { get; } = new UnderlyingResourceAction(DetachValue); - /// Determines if two values are the same. - public static bool operator ==(UnderlyingResourceAction left, UnderlyingResourceAction right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UnderlyingResourceAction left, UnderlyingResourceAction right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UnderlyingResourceAction(string value) => new UnderlyingResourceAction(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UnderlyingResourceAction other && Equals(other); - /// - public bool Equals(UnderlyingResourceAction other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnitOfMeasure.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnitOfMeasure.cs deleted file mode 100644 index 4286a69dca2a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnitOfMeasure.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The unit of time measurement for the specified VM price. Example: OneHour. - public readonly partial struct UnitOfMeasure : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UnitOfMeasure(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OneHourValue = "OneHour"; - - /// OneHour. - public static UnitOfMeasure OneHour { get; } = new UnitOfMeasure(OneHourValue); - /// Determines if two values are the same. - public static bool operator ==(UnitOfMeasure left, UnitOfMeasure right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UnitOfMeasure left, UnitOfMeasure right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UnitOfMeasure(string value) => new UnitOfMeasure(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UnitOfMeasure other && Equals(other); - /// - public bool Equals(UnitOfMeasure other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAssetReferenceBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAssetReferenceBase.cs index aeb1bd11f7d9..d4b9277ba7ed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAssetReferenceBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAssetReferenceBase.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownAssetReferenceBase. - internal partial class UnknownAssetReferenceBase : AssetReferenceBase + /// + /// The UnknownAssetReferenceBase. + /// Serialized Name: UnknownAssetReferenceBase + /// + internal partial class UnknownAssetReferenceBase : MachineLearningAssetReferenceBase { /// Initializes a new instance of UnknownAssetReferenceBase. - /// [Required] Specifies the type of asset reference. + /// + /// [Required] Specifies the type of asset reference. + /// Serialized Name: AssetReferenceBase.referenceType + /// internal UnknownAssetReferenceBase(ReferenceType referenceType) : base(referenceType) { ReferenceType = referenceType; 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 bc04f07489be..43aff4a307a7 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 @@ -41,10 +41,10 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static UnknownAutoMLVertical DeserializeUnknownAutoMLVertical(JsonElement element) { - Optional logVerbosity = default; + Optional logVerbosity = default; Optional targetColumnName = default; TaskType taskType = "Unknown"; - MLTableJobInput trainingData = default; + MachineLearningTableJobInput trainingData = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("logVerbosity")) @@ -54,7 +54,7 @@ internal static UnknownAutoMLVertical DeserializeUnknownAutoMLVertical(JsonEleme property.ThrowNonNullablePropertyIsNull(); continue; } - logVerbosity = new LogVerbosity(property.Value.GetString()); + logVerbosity = new MachineLearningLogVerbosity(property.Value.GetString()); continue; } if (property.NameEquals("targetColumnName")) @@ -74,7 +74,7 @@ internal static UnknownAutoMLVertical DeserializeUnknownAutoMLVertical(JsonEleme } if (property.NameEquals("trainingData")) { - trainingData = MLTableJobInput.DeserializeMLTableJobInput(property.Value); + trainingData = MachineLearningTableJobInput.DeserializeMachineLearningTableJobInput(property.Value); continue; } } 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 c8524340bc9b..d2bafafe93b1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownAutoMLVertical.cs @@ -7,18 +7,31 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownAutoMLVertical. + /// + /// The UnknownAutoMLVertical. + /// Serialized Name: UnknownAutoMLVertical + /// internal partial class UnknownAutoMLVertical : AutoMLVertical { /// Initializes a new instance of UnknownAutoMLVertical. - /// Log verbosity for the job. + /// + /// Log verbosity for the job. + /// Serialized Name: AutoMLVertical.logVerbosity + /// /// /// Target column name: This is prediction values column. /// Also known as label column name in context of classification tasks. + /// Serialized Name: AutoMLVertical.targetColumnName + /// + /// + /// [Required] Task type for AutoMLJob. + /// Serialized Name: AutoMLVertical.taskType + /// + /// + /// [Required] Training data input. + /// Serialized Name: AutoMLVertical.trainingData /// - /// [Required] Task type for AutoMLJob. - /// [Required] Training data input. - internal UnknownAutoMLVertical(LogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MLTableJobInput trainingData) : base(logVerbosity, targetColumnName, taskType, trainingData) + internal UnknownAutoMLVertical(MachineLearningLogVerbosity? logVerbosity, string targetColumnName, TaskType taskType, MachineLearningTableJobInput trainingData) : base(logVerbosity, targetColumnName, taskType, trainingData) { TaskType = taskType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.Serialization.cs index 6b18025e012a..053487f60dc4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.Serialization.cs @@ -60,12 +60,12 @@ internal static UnknownCompute DeserializeUnknownCompute(JsonElement element) { ComputeType computeType = "Unknown"; Optional computeLocation = default; - Optional provisioningState = default; + Optional provisioningState = default; Optional description = default; Optional createdOn = default; Optional modifiedOn = default; Optional resourceId = default; - Optional> provisioningErrors = default; + Optional> provisioningErrors = default; Optional isAttachedCompute = default; Optional disableLocalAuth = default; foreach (var property in element.EnumerateObject()) @@ -87,7 +87,7 @@ internal static UnknownCompute DeserializeUnknownCompute(JsonElement element) property.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = new ProvisioningState(property.Value.GetString()); + provisioningState = new MachineLearningProvisioningState(property.Value.GetString()); continue; } if (property.NameEquals("description")) @@ -137,10 +137,10 @@ internal static UnknownCompute DeserializeUnknownCompute(JsonElement element) provisioningErrors = null; continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); + array.Add(MachineLearningError.DeserializeMachineLearningError(item)); } provisioningErrors = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.cs index db53780ac094..af22523eaff6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownCompute.cs @@ -11,21 +11,54 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownCompute. - internal partial class UnknownCompute : Compute + /// + /// The UnknownCompute. + /// Serialized Name: UnknownCompute + /// + internal partial class UnknownCompute : MachineLearningComputeProperties { /// Initializes a new instance of UnknownCompute. - /// 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. - internal UnknownCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) + /// + /// The type of compute + /// Serialized Name: Compute.computeType + /// + /// + /// Location for the underlying compute + /// Serialized Name: Compute.computeLocation + /// + /// + /// The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed. + /// Serialized Name: Compute.provisioningState + /// + /// + /// The description of the Machine Learning compute. + /// Serialized Name: Compute.description + /// + /// + /// The time at which the compute was created. + /// Serialized Name: Compute.createdOn + /// + /// + /// The time at which the compute was last modified. + /// Serialized Name: Compute.modifiedOn + /// + /// + /// ARM resource id of the underlying compute + /// Serialized Name: Compute.resourceId + /// + /// + /// Errors during provisioning + /// Serialized Name: Compute.provisioningErrors + /// + /// + /// Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false. + /// Serialized Name: Compute.isAttachedCompute + /// + /// + /// Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication. + /// Serialized Name: Compute.disableLocalAuth + /// + internal UnknownCompute(ComputeType computeType, string computeLocation, MachineLearningProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) { ComputeType = computeType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownComputeSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownComputeSecrets.cs index d81f971a7f06..cce6846bdff2 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownComputeSecrets.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownComputeSecrets.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownComputeSecrets. - internal partial class UnknownComputeSecrets : ComputeSecrets + /// + /// The UnknownComputeSecrets. + /// Serialized Name: UnknownComputeSecrets + /// + internal partial class UnknownComputeSecrets : MachineLearningComputeSecrets { /// Initializes a new instance of UnknownComputeSecrets. - /// The type of compute. + /// + /// The type of compute + /// Serialized Name: ComputeSecrets.computeType + /// internal UnknownComputeSecrets(ComputeType computeType) : base(computeType) { ComputeType = computeType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreCredentials.cs index 5b20848ab643..acd36e112cba 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreCredentials.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreCredentials.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownDatastoreCredentials. - internal partial class UnknownDatastoreCredentials : DatastoreCredentials + /// + /// The UnknownDatastoreCredentials. + /// Serialized Name: UnknownDatastoreCredentials + /// + internal partial class UnknownDatastoreCredentials : MachineLearningDatastoreCredentials { /// Initializes a new instance of UnknownDatastoreCredentials. - /// [Required] Credential type used to authentication with storage. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreCredentials.credentialsType + /// internal UnknownDatastoreCredentials(CredentialsType credentialsType) : base(credentialsType) { CredentialsType = credentialsType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreSecrets.cs index 0b6b4948e194..104972722ee9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreSecrets.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDatastoreSecrets.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownDatastoreSecrets. - internal partial class UnknownDatastoreSecrets : DatastoreSecrets + /// + /// The UnknownDatastoreSecrets. + /// Serialized Name: UnknownDatastoreSecrets + /// + internal partial class UnknownDatastoreSecrets : MachineLearningDatastoreSecrets { /// Initializes a new instance of UnknownDatastoreSecrets. - /// [Required] Credential type used to authentication with storage. + /// + /// [Required] Credential type used to authentication with storage. + /// Serialized Name: DatastoreSecrets.secretsType + /// internal UnknownDatastoreSecrets(SecretsType secretsType) : base(secretsType) { SecretsType = secretsType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDistributionConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDistributionConfiguration.cs index d4410e8d31de..ef6daf649d6c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDistributionConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownDistributionConfiguration.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownDistributionConfiguration. - internal partial class UnknownDistributionConfiguration : DistributionConfiguration + /// + /// The UnknownDistributionConfiguration. + /// Serialized Name: UnknownDistributionConfiguration + /// + internal partial class UnknownDistributionConfiguration : MachineLearningDistributionConfiguration { /// Initializes a new instance of UnknownDistributionConfiguration. - /// [Required] Specifies the type of distribution framework. + /// + /// [Required] Specifies the type of distribution framework. + /// Serialized Name: DistributionConfiguration.distributionType + /// internal UnknownDistributionConfiguration(DistributionType distributionType) : base(distributionType) { DistributionType = distributionType; 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 cea87f441e7b..3bc51a50b0da 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownEarlyTerminationPolicy.cs @@ -7,13 +7,25 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownEarlyTerminationPolicy. - internal partial class UnknownEarlyTerminationPolicy : EarlyTerminationPolicy + /// + /// The UnknownEarlyTerminationPolicy. + /// Serialized Name: UnknownEarlyTerminationPolicy + /// + internal partial class UnknownEarlyTerminationPolicy : MachineLearningEarlyTerminationPolicy { /// Initializes a new instance of UnknownEarlyTerminationPolicy. - /// Number of intervals by which to delay the first evaluation. - /// Interval (number of runs) between policy evaluations. - /// [Required] Name of policy configuration. + /// + /// Number of intervals by which to delay the first evaluation. + /// Serialized Name: EarlyTerminationPolicy.delayEvaluation + /// + /// + /// Interval (number of runs) between policy evaluations. + /// Serialized Name: EarlyTerminationPolicy.evaluationInterval + /// + /// + /// [Required] Name of policy configuration + /// Serialized Name: EarlyTerminationPolicy.policyType + /// internal UnknownEarlyTerminationPolicy(int? delayEvaluation, int? evaluationInterval, EarlyTerminationPolicyType policyType) : base(delayEvaluation, evaluationInterval, policyType) { PolicyType = policyType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownForecastHorizon.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownForecastHorizon.cs index 71c1c95291e7..564c676bff0d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownForecastHorizon.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownForecastHorizon.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownForecastHorizon. + /// + /// The UnknownForecastHorizon. + /// Serialized Name: UnknownForecastHorizon + /// internal partial class UnknownForecastHorizon : ForecastHorizon { /// Initializes a new instance of UnknownForecastHorizon. - /// [Required] Set forecast horizon value selection mode. + /// + /// [Required] Set forecast horizon value selection mode. + /// Serialized Name: ForecastHorizon.mode + /// internal UnknownForecastHorizon(ForecastHorizonMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownIdentityConfiguration.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownIdentityConfiguration.cs index c5e15974c6c9..ec0704b92c57 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownIdentityConfiguration.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownIdentityConfiguration.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownIdentityConfiguration. - internal partial class UnknownIdentityConfiguration : IdentityConfiguration + /// + /// The UnknownIdentityConfiguration. + /// Serialized Name: UnknownIdentityConfiguration + /// + internal partial class UnknownIdentityConfiguration : MachineLearningIdentityConfiguration { /// Initializes a new instance of UnknownIdentityConfiguration. - /// [Required] Specifies the type of identity framework. + /// + /// [Required] Specifies the type of identity framework. + /// Serialized Name: IdentityConfiguration.identityType + /// internal UnknownIdentityConfiguration(IdentityConfigurationType identityType) : base(identityType) { IdentityType = identityType; 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 74a5e327b266..b5db4b665d44 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobInput.cs @@ -7,12 +7,21 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownJobInput. - internal partial class UnknownJobInput : JobInput + /// + /// The UnknownJobInput. + /// Serialized Name: UnknownJobInput + /// + internal partial class UnknownJobInput : MachineLearningJobInput { /// Initializes a new instance of UnknownJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. + /// + /// Description for the input. + /// Serialized Name: JobInput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobInput.jobInputType + /// internal UnknownJobInput(string description, JobInputType jobInputType) : base(description, jobInputType) { JobInputType = jobInputType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobLimits.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobLimits.cs index 7d6cd99fbe09..a2004501b937 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobLimits.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobLimits.cs @@ -9,12 +9,21 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownJobLimits. - internal partial class UnknownJobLimits : JobLimits + /// + /// The UnknownJobLimits. + /// Serialized Name: UnknownJobLimits + /// + internal partial class UnknownJobLimits : MachineLearningJobLimits { /// Initializes a new instance of UnknownJobLimits. - /// [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. + /// + /// [Required] JobLimit type. + /// Serialized Name: JobLimits.jobLimitsType + /// + /// + /// The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds. + /// Serialized Name: JobLimits.timeout + /// internal UnknownJobLimits(JobLimitsType jobLimitsType, TimeSpan? timeout) : base(jobLimitsType, timeout) { JobLimitsType = jobLimitsType; 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 597740fe13ae..1660243975b8 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownJobOutput.cs @@ -7,12 +7,21 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownJobOutput. - internal partial class UnknownJobOutput : JobOutput + /// + /// The UnknownJobOutput. + /// Serialized Name: UnknownJobOutput + /// + internal partial class UnknownJobOutput : MachineLearningJobOutput { /// Initializes a new instance of UnknownJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. + /// + /// Description for the output. + /// Serialized Name: JobOutput.description + /// + /// + /// [Required] Specifies the type of job. + /// Serialized Name: JobOutput.jobOutputType + /// internal UnknownJobOutput(string description, JobOutputType jobOutputType) : base(description, jobOutputType) { JobOutputType = jobOutputType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNCrossValidations.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNCrossValidations.cs index 371e1ce9ee48..e7e111883694 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNCrossValidations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownNCrossValidations.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownNCrossValidations. + /// + /// The UnknownNCrossValidations. + /// Serialized Name: UnknownNCrossValidations + /// internal partial class UnknownNCrossValidations : NCrossValidations { /// Initializes a new instance of UnknownNCrossValidations. - /// [Required] Mode for determining N-Cross validations. + /// + /// [Required] Mode for determining N-Cross validations. + /// Serialized Name: NCrossValidations.mode + /// internal UnknownNCrossValidations(NCrossValidationsMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineScaleSettings.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineScaleSettings.cs index 611fea5e8910..11a77ff99211 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineScaleSettings.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownOnlineScaleSettings.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownOnlineScaleSettings. - internal partial class UnknownOnlineScaleSettings : OnlineScaleSettings + /// + /// The UnknownOnlineScaleSettings. + /// Serialized Name: UnknownOnlineScaleSettings + /// + internal partial class UnknownOnlineScaleSettings : MachineLearningOnlineScaleSettings { /// Initializes a new instance of UnknownOnlineScaleSettings. - /// [Required] Type of deployment scaling algorithm. + /// + /// [Required] Type of deployment scaling algorithm + /// Serialized Name: OnlineScaleSettings.scaleType + /// internal UnknownOnlineScaleSettings(ScaleType scaleType) : base(scaleType) { ScaleType = scaleType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSamplingAlgorithm.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSamplingAlgorithm.cs index cd1ea7d7e447..cbe025bf38a0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSamplingAlgorithm.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSamplingAlgorithm.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownSamplingAlgorithm. + /// + /// The UnknownSamplingAlgorithm. + /// Serialized Name: UnknownSamplingAlgorithm + /// internal partial class UnknownSamplingAlgorithm : SamplingAlgorithm { /// Initializes a new instance of UnknownSamplingAlgorithm. - /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties. + /// + /// [Required] The algorithm used for generating hyperparameter values, along with configuration properties + /// Serialized Name: SamplingAlgorithm.samplingAlgorithmType + /// internal UnknownSamplingAlgorithm(SamplingAlgorithmType samplingAlgorithmType) : base(samplingAlgorithmType) { SamplingAlgorithmType = samplingAlgorithmType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownScheduleActionBase.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownScheduleActionBase.cs index 623dba76cc54..d77b2a169f6b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownScheduleActionBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownScheduleActionBase.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownScheduleActionBase. - internal partial class UnknownScheduleActionBase : ScheduleActionBase + /// + /// The UnknownScheduleActionBase. + /// Serialized Name: UnknownScheduleActionBase + /// + internal partial class UnknownScheduleActionBase : MachineLearningScheduleAction { /// Initializes a new instance of UnknownScheduleActionBase. - /// [Required] Specifies the action type of the schedule. + /// + /// [Required] Specifies the action type of the schedule + /// Serialized Name: ScheduleActionBase.actionType + /// internal UnknownScheduleActionBase(ScheduleActionType actionType) : base(actionType) { ActionType = actionType; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSeasonality.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSeasonality.cs index df797ca6146f..82763bb30578 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSeasonality.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownSeasonality.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownSeasonality. - internal partial class UnknownSeasonality : Seasonality + /// + /// The UnknownSeasonality. + /// Serialized Name: UnknownSeasonality + /// + internal partial class UnknownSeasonality : ForecastingSeasonality { /// Initializes a new instance of UnknownSeasonality. - /// [Required] Seasonality mode. + /// + /// [Required] Seasonality mode. + /// Serialized Name: Seasonality.mode + /// internal UnknownSeasonality(SeasonalityMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetLags.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetLags.cs index 1530adc2a20a..e8d4302a6532 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetLags.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetLags.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownTargetLags. + /// + /// The UnknownTargetLags. + /// Serialized Name: UnknownTargetLags + /// internal partial class UnknownTargetLags : TargetLags { /// Initializes a new instance of UnknownTargetLags. - /// [Required] Set target lags mode - Auto/Custom. + /// + /// [Required] Set target lags mode - Auto/Custom + /// Serialized Name: TargetLags.mode + /// internal UnknownTargetLags(TargetLagsMode mode) : base(mode) { Mode = mode; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetRollingWindowSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetRollingWindowSize.cs index 1a7a0bf521b9..0a883ad32e98 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetRollingWindowSize.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTargetRollingWindowSize.cs @@ -7,11 +7,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownTargetRollingWindowSize. + /// + /// The UnknownTargetRollingWindowSize. + /// Serialized Name: UnknownTargetRollingWindowSize + /// internal partial class UnknownTargetRollingWindowSize : TargetRollingWindowSize { /// Initializes a new instance of UnknownTargetRollingWindowSize. - /// [Required] TargetRollingWindowSiz detection mode. + /// + /// [Required] TargetRollingWindowSiz detection mode. + /// Serialized Name: TargetRollingWindowSize.mode + /// internal UnknownTargetRollingWindowSize(TargetRollingWindowSizeMode mode) : base(mode) { Mode = mode; 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 f067a1d7d90d..b78d221251ce 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 @@ -54,7 +54,7 @@ internal static UnknownTriggerBase DeserializeUnknownTriggerBase(JsonElement ele Optional endTime = default; Optional startTime = default; Optional timeZone = default; - TriggerType triggerType = "Unknown"; + MachineLearningTriggerType triggerType = "Unknown"; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("endTime")) @@ -84,7 +84,7 @@ internal static UnknownTriggerBase DeserializeUnknownTriggerBase(JsonElement ele } if (property.NameEquals("triggerType")) { - triggerType = new TriggerType(property.Value.GetString()); + triggerType = new MachineLearningTriggerType(property.Value.GetString()); continue; } } 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 bab05238aa18..414e93ceeb9b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownTriggerBase.cs @@ -7,22 +7,33 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownTriggerBase. - internal partial class UnknownTriggerBase : TriggerBase + /// + /// The UnknownTriggerBase. + /// Serialized Name: UnknownTriggerBase + /// + internal partial class UnknownTriggerBase : MachineLearningTriggerBase { /// Initializes a new instance of UnknownTriggerBase. /// /// 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" /// If not present, the schedule will run indefinitely + /// Serialized Name: TriggerBase.endTime + /// + /// + /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. + /// Serialized Name: TriggerBase.startTime /// - /// Specifies start time of schedule in ISO 8601 format, but without a UTC offset. /// /// 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 + /// Serialized Name: TriggerBase.timeZone + /// + /// + /// [Required] + /// Serialized Name: TriggerBase.triggerType /// - /// [Required]. - internal UnknownTriggerBase(string endTime, string startTime, string timeZone, TriggerType triggerType) : base(endTime, startTime, timeZone, triggerType) + internal UnknownTriggerBase(string endTime, string startTime, string timeZone, MachineLearningTriggerType triggerType) : base(endTime, startTime, timeZone, triggerType) { TriggerType = triggerType; } 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 9385a8f51e6c..625801a203c3 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 @@ -42,16 +42,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspaceConnectionPropertiesV2(JsonElement element) { - ConnectionAuthType authType = "Unknown"; - Optional category = default; + MachineLearningConnectionAuthType authType = "Unknown"; + Optional category = default; Optional target = default; Optional value = default; - Optional valueFormat = default; + Optional valueFormat = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("authType")) { - authType = new ConnectionAuthType(property.Value.GetString()); + authType = new MachineLearningConnectionAuthType(property.Value.GetString()); continue; } if (property.NameEquals("category")) @@ -61,7 +61,7 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa property.ThrowNonNullablePropertyIsNull(); continue; } - category = new ConnectionCategory(property.Value.GetString()); + category = new MachineLearningConnectionCategory(property.Value.GetString()); continue; } if (property.NameEquals("target")) @@ -81,7 +81,7 @@ internal static UnknownWorkspaceConnectionPropertiesV2 DeserializeUnknownWorkspa property.ThrowNonNullablePropertyIsNull(); continue; } - valueFormat = new ValueFormat(property.Value.GetString()); + valueFormat = new MachineLearningValueFormat(property.Value.GetString()); continue; } } 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 738aa0037558..42593b58550f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UnknownWorkspaceConnectionPropertiesV2.cs @@ -7,16 +7,31 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The UnknownWorkspaceConnectionPropertiesV2. - internal partial class UnknownWorkspaceConnectionPropertiesV2 : WorkspaceConnectionPropertiesV2 + /// + /// The UnknownWorkspaceConnectionPropertiesV2. + /// Serialized Name: UnknownWorkspaceConnectionPropertiesV2 + /// + internal partial class UnknownWorkspaceConnectionPropertiesV2 : MachineLearningWorkspaceConnectionProperties { /// Initializes a new instance of UnknownWorkspaceConnectionPropertiesV2. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - internal UnknownWorkspaceConnectionPropertiesV2(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat) : base(authType, category, target, value, valueFormat) + /// + /// Authentication type of the connection target + /// Serialized Name: WorkspaceConnectionPropertiesV2.authType + /// + /// + /// Category of the connection + /// Serialized Name: WorkspaceConnectionPropertiesV2.category + /// + /// Serialized Name: WorkspaceConnectionPropertiesV2.target. + /// + /// Value details of the workspace connection. + /// Serialized Name: WorkspaceConnectionPropertiesV2.value + /// + /// + /// format for the workspace connection value + /// Serialized Name: WorkspaceConnectionPropertiesV2.valueFormat + /// + internal UnknownWorkspaceConnectionPropertiesV2(MachineLearningConnectionAuthType authType, MachineLearningConnectionCategory? category, string target, string value, MachineLearningValueFormat? valueFormat) : base(authType, category, target, value, valueFormat) { AuthType = authType; } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs deleted file mode 100644 index 52156a4f5e67..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotas.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UpdateWorkspaceQuotas - { - internal static UpdateWorkspaceQuotas DeserializeUpdateWorkspaceQuotas(JsonElement element) - { - Optional id = default; - Optional type = default; - Optional limit = default; - Optional unit = default; - Optional status = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("id")) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("limit")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - limit = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("unit")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - unit = new QuotaUnit(property.Value.GetString()); - continue; - } - if (property.NameEquals("status")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - status = new Status(property.Value.GetString()); - continue; - } - } - return new UpdateWorkspaceQuotas(id.Value, type.Value, Optional.ToNullable(limit), Optional.ToNullable(unit), Optional.ToNullable(status)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotas.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotas.cs deleted file mode 100644 index 2affadea3945..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotas.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The properties for update Quota response. - public partial class UpdateWorkspaceQuotas - { - /// Initializes a new instance of UpdateWorkspaceQuotas. - internal UpdateWorkspaceQuotas() - { - } - - /// Initializes a new instance of UpdateWorkspaceQuotas. - /// 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. - internal UpdateWorkspaceQuotas(string id, string updateWorkspaceQuotasType, long? limit, QuotaUnit? unit, Status? status) - { - Id = id; - UpdateWorkspaceQuotasType = updateWorkspaceQuotasType; - Limit = limit; - Unit = unit; - Status = status; - } - - /// Specifies the resource ID. - public string Id { get; } - /// Specifies the resource type. - public string UpdateWorkspaceQuotasType { get; } - /// The maximum permitted quota of the resource. - public long? Limit { get; } - /// An enum describing the unit of quota measurement. - public QuotaUnit? Unit { get; } - /// Status of update workspace quota. - public Status? Status { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs index 9654ed21e161..29ad18afa214 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.Serialization.cs @@ -15,7 +15,7 @@ internal partial class UpdateWorkspaceQuotasResult { internal static UpdateWorkspaceQuotasResult DeserializeUpdateWorkspaceQuotasResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -26,10 +26,10 @@ internal static UpdateWorkspaceQuotasResult DeserializeUpdateWorkspaceQuotasResu property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(UpdateWorkspaceQuotas.DeserializeUpdateWorkspaceQuotas(item)); + array.Add(MachineLearningWorkspaceQuotaUpdate.DeserializeMachineLearningWorkspaceQuotaUpdate(item)); } value = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.cs index fa43c0e09189..c172da881f0b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UpdateWorkspaceQuotasResult.cs @@ -10,27 +10,42 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The result of update workspace quota. + /// + /// The result of update workspace quota. + /// Serialized Name: UpdateWorkspaceQuotasResult + /// internal partial class UpdateWorkspaceQuotasResult { /// Initializes a new instance of UpdateWorkspaceQuotasResult. internal UpdateWorkspaceQuotasResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of UpdateWorkspaceQuotasResult. - /// The list of workspace quota update result. - /// The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. - internal UpdateWorkspaceQuotasResult(IReadOnlyList value, string nextLink) + /// + /// The list of workspace quota update result. + /// Serialized Name: UpdateWorkspaceQuotasResult.value + /// + /// + /// The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. + /// Serialized Name: UpdateWorkspaceQuotasResult.nextLink + /// + internal UpdateWorkspaceQuotasResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// The list of workspace quota update result. - public IReadOnlyList Value { get; } - /// The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. + /// + /// The list of workspace quota update result. + /// Serialized Name: UpdateWorkspaceQuotasResult.value + /// + public IReadOnlyList Value { get; } + /// + /// The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result. + /// Serialized Name: UpdateWorkspaceQuotasResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.Serialization.cs deleted file mode 100644 index a796e78db311..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.Serialization.cs +++ /dev/null @@ -1,184 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UriFileDataVersion : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("dataType"); - writer.WriteStringValue(DataType.ToString()); - writer.WritePropertyName("dataUri"); - writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static UriFileDataVersion DeserializeUriFileDataVersion(JsonElement element) - { - DataType dataType = default; - Uri dataUri = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataType")) - { - dataType = new DataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataUri")) - { - dataUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new UriFileDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs deleted file mode 100644 index 2ba7418fe7fa..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileDataVersion.cs +++ /dev/null @@ -1,40 +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 -{ - /// uri-file data version entity. - public partial class UriFileDataVersion : DataVersionProperties - { - /// Initializes a new instance of UriFileDataVersion. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - /// is null. - public UriFileDataVersion(Uri dataUri) : base(dataUri) - { - Argument.AssertNotNull(dataUri, nameof(dataUri)); - - DataType = DataType.UriFile; - } - - /// Initializes a new instance of UriFileDataVersion. - /// 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?. - /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - internal UriFileDataVersion(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, DataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) - { - DataType = dataType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobInput.Serialization.cs deleted file mode 100644 index 79ecf1ad592f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobInput.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UriFileJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static UriFileJobInput DeserializeUriFileJobInput(JsonElement element) - { - Optional mode = default; - Uri uri = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new InputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new UriFileJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobInput.cs deleted file mode 100644 index 2ace3258d9b6..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The UriFileJobInput. - public partial class UriFileJobInput : JobInput - { - /// Initializes a new instance of UriFileJobInput. - /// [Required] Input Asset URI. - /// is null. - public UriFileJobInput(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - JobInputType = JobInputType.UriFile; - } - - /// Initializes a new instance of UriFileJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// Input Asset Delivery Mode. - /// [Required] Input Asset URI. - internal UriFileJobInput(string description, JobInputType jobInputType, InputDeliveryMode? mode, Uri uri) : base(description, jobInputType) - { - Mode = mode; - Uri = uri; - JobInputType = jobInputType; - } - - /// Input Asset Delivery Mode. - public InputDeliveryMode? Mode { get; set; } - /// [Required] Input Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobOutput.Serialization.cs deleted file mode 100644 index 5d495e9f7e6f..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobOutput.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UriFileJobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - if (Uri != null) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static UriFileJobOutput DeserializeUriFileJobOutput(JsonElement element) - { - Optional mode = default; - Optional uri = default; - Optional description = default; - JobOutputType jobOutputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new OutputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobOutputType")) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } - } - return new UriFileJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobOutput.cs deleted file mode 100644 index 34b35b69fde4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFileJobOutput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The UriFileJobOutput. - public partial class UriFileJobOutput : JobOutput - { - /// Initializes a new instance of UriFileJobOutput. - public UriFileJobOutput() - { - JobOutputType = JobOutputType.UriFile; - } - - /// Initializes a new instance of UriFileJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - /// Output Asset Delivery Mode. - /// Output Asset URI. - internal UriFileJobOutput(string description, JobOutputType jobOutputType, OutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) - { - Mode = mode; - Uri = uri; - JobOutputType = jobOutputType; - } - - /// Output Asset Delivery Mode. - public OutputDeliveryMode? Mode { get; set; } - /// Output Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.Serialization.cs deleted file mode 100644 index 3699d5fd784a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.Serialization.cs +++ /dev/null @@ -1,184 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UriFolderDataVersion : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("dataType"); - writer.WriteStringValue(DataType.ToString()); - writer.WritePropertyName("dataUri"); - writer.WriteStringValue(DataUri.AbsoluteUri); - if (Optional.IsDefined(IsAnonymous)) - { - writer.WritePropertyName("isAnonymous"); - writer.WriteBooleanValue(IsAnonymous.Value); - } - if (Optional.IsDefined(IsArchived)) - { - writer.WritePropertyName("isArchived"); - writer.WriteBooleanValue(IsArchived.Value); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsCollectionDefined(Properties)) - { - if (Properties != null) - { - writer.WritePropertyName("properties"); - 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"); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("tags"); - } - } - writer.WriteEndObject(); - } - - internal static UriFolderDataVersion DeserializeUriFolderDataVersion(JsonElement element) - { - DataType dataType = default; - Uri dataUri = default; - Optional isAnonymous = default; - Optional isArchived = default; - Optional description = default; - Optional> properties = default; - Optional> tags = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("dataType")) - { - dataType = new DataType(property.Value.GetString()); - continue; - } - if (property.NameEquals("dataUri")) - { - dataUri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("isAnonymous")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAnonymous = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("isArchived")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isArchived = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - properties = 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, property0.Value.GetString()); - } - } - properties = dictionary; - continue; - } - if (property.NameEquals("tags")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - tags = 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, property0.Value.GetString()); - } - } - tags = dictionary; - continue; - } - } - return new UriFolderDataVersion(description.Value, Optional.ToDictionary(properties), Optional.ToDictionary(tags), Optional.ToNullable(isAnonymous), Optional.ToNullable(isArchived), dataType, dataUri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs deleted file mode 100644 index 7a93bbea7c36..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderDataVersion.cs +++ /dev/null @@ -1,40 +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 -{ - /// uri-folder data version entity. - public partial class UriFolderDataVersion : DataVersionProperties - { - /// Initializes a new instance of UriFolderDataVersion. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - /// is null. - public UriFolderDataVersion(Uri dataUri) : base(dataUri) - { - Argument.AssertNotNull(dataUri, nameof(dataUri)); - - DataType = DataType.UriFolder; - } - - /// Initializes a new instance of UriFolderDataVersion. - /// 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?. - /// [Required] Specifies the type of data. - /// [Required] Uri of the data. Usage/meaning depends on Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType. - internal UriFolderDataVersion(string description, IDictionary properties, IDictionary tags, bool? isAnonymous, bool? isArchived, DataType dataType, Uri dataUri) : base(description, properties, tags, isAnonymous, isArchived, dataType, dataUri) - { - DataType = dataType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobInput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobInput.Serialization.cs deleted file mode 100644 index 42b2b785e0b0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobInput.Serialization.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.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UriFolderJobInput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobInputType"); - writer.WriteStringValue(JobInputType.ToString()); - writer.WriteEndObject(); - } - - internal static UriFolderJobInput DeserializeUriFolderJobInput(JsonElement element) - { - Optional mode = default; - Uri uri = default; - Optional description = default; - JobInputType jobInputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new InputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobInputType")) - { - jobInputType = new JobInputType(property.Value.GetString()); - continue; - } - } - return new UriFolderJobInput(description.Value, jobInputType, Optional.ToNullable(mode), uri); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobInput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobInput.cs deleted file mode 100644 index d27ed8d7a06d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobInput.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The UriFolderJobInput. - public partial class UriFolderJobInput : JobInput - { - /// Initializes a new instance of UriFolderJobInput. - /// [Required] Input Asset URI. - /// is null. - public UriFolderJobInput(Uri uri) - { - Argument.AssertNotNull(uri, nameof(uri)); - - Uri = uri; - JobInputType = JobInputType.UriFolder; - } - - /// Initializes a new instance of UriFolderJobInput. - /// Description for the input. - /// [Required] Specifies the type of job. - /// Input Asset Delivery Mode. - /// [Required] Input Asset URI. - internal UriFolderJobInput(string description, JobInputType jobInputType, InputDeliveryMode? mode, Uri uri) : base(description, jobInputType) - { - Mode = mode; - Uri = uri; - JobInputType = jobInputType; - } - - /// Input Asset Delivery Mode. - public InputDeliveryMode? Mode { get; set; } - /// [Required] Input Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobOutput.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobOutput.Serialization.cs deleted file mode 100644 index 8957808d2eb9..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobOutput.Serialization.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UriFolderJobOutput : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Mode)) - { - writer.WritePropertyName("mode"); - writer.WriteStringValue(Mode.Value.ToString()); - } - if (Optional.IsDefined(Uri)) - { - if (Uri != null) - { - writer.WritePropertyName("uri"); - writer.WriteStringValue(Uri.AbsoluteUri); - } - else - { - writer.WriteNull("uri"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - writer.WritePropertyName("jobOutputType"); - writer.WriteStringValue(JobOutputType.ToString()); - writer.WriteEndObject(); - } - - internal static UriFolderJobOutput DeserializeUriFolderJobOutput(JsonElement element) - { - Optional mode = default; - Optional uri = default; - Optional description = default; - JobOutputType jobOutputType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("mode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - mode = new OutputDeliveryMode(property.Value.GetString()); - continue; - } - if (property.NameEquals("uri")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - uri = null; - continue; - } - uri = new Uri(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("jobOutputType")) - { - jobOutputType = new JobOutputType(property.Value.GetString()); - continue; - } - } - return new UriFolderJobOutput(description.Value, jobOutputType, Optional.ToNullable(mode), uri.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobOutput.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobOutput.cs deleted file mode 100644 index a0ac77816fa3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UriFolderJobOutput.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The UriFolderJobOutput. - public partial class UriFolderJobOutput : JobOutput - { - /// Initializes a new instance of UriFolderJobOutput. - public UriFolderJobOutput() - { - JobOutputType = JobOutputType.UriFolder; - } - - /// Initializes a new instance of UriFolderJobOutput. - /// Description for the output. - /// [Required] Specifies the type of job. - /// Output Asset Delivery Mode. - /// Output Asset URI. - internal UriFolderJobOutput(string description, JobOutputType jobOutputType, OutputDeliveryMode? mode, Uri uri) : base(description, jobOutputType) - { - Mode = mode; - Uri = uri; - JobOutputType = jobOutputType; - } - - /// Output Asset Delivery Mode. - public OutputDeliveryMode? Mode { get; set; } - /// Output Asset URI. - public Uri Uri { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageName.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageName.Serialization.cs deleted file mode 100644 index 8637fe0b513b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageName.Serialization.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UsageName - { - internal static UsageName DeserializeUsageName(JsonElement element) - { - Optional value = default; - Optional localizedValue = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("localizedValue")) - { - localizedValue = property.Value.GetString(); - continue; - } - } - return new UsageName(value.Value, localizedValue.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageName.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageName.cs deleted file mode 100644 index 6736e1b088ad..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageName.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The Usage Names. - public partial class UsageName - { - /// Initializes a new instance of UsageName. - internal UsageName() - { - } - - /// Initializes a new instance of UsageName. - /// The name of the resource. - /// The localized name of the resource. - internal UsageName(string value, string localizedValue) - { - Value = value; - LocalizedValue = localizedValue; - } - - /// The name of the resource. - public string Value { get; } - /// The localized name of the resource. - public string LocalizedValue { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageUnit.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageUnit.cs deleted file mode 100644 index 5dd7b1651e1d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsageUnit.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// An enum describing the unit of usage measurement. - public readonly partial struct UsageUnit : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UsageUnit(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string CountValue = "Count"; - - /// Count. - public static UsageUnit Count { get; } = new UsageUnit(CountValue); - /// Determines if two values are the same. - public static bool operator ==(UsageUnit left, UsageUnit right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UsageUnit left, UsageUnit right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UsageUnit(string value) => new UsageUnit(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UsageUnit other && Equals(other); - /// - public bool Equals(UsageUnit other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UseStl.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UseStl.cs deleted file mode 100644 index fb7730ca59de..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UseStl.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 -{ - /// Configure STL Decomposition of the time-series target column. - public readonly partial struct UseStl : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public UseStl(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "None"; - private const string SeasonValue = "Season"; - private const string SeasonTrendValue = "SeasonTrend"; - - /// No stl decomposition. - public static UseStl None { get; } = new UseStl(NoneValue); - /// Season. - public static UseStl Season { get; } = new UseStl(SeasonValue); - /// SeasonTrend. - public static UseStl SeasonTrend { get; } = new UseStl(SeasonTrendValue); - /// Determines if two values are the same. - public static bool operator ==(UseStl left, UseStl right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(UseStl left, UseStl right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator UseStl(string value) => new UseStl(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is UseStl other && Equals(other); - /// - public bool Equals(UseStl other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserAccountCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserAccountCredentials.Serialization.cs deleted file mode 100644 index cf93e189be30..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserAccountCredentials.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UserAccountCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("adminUserName"); - writer.WriteStringValue(AdminUserName); - if (Optional.IsDefined(AdminUserSshPublicKey)) - { - writer.WritePropertyName("adminUserSshPublicKey"); - writer.WriteStringValue(AdminUserSshPublicKey); - } - if (Optional.IsDefined(AdminUserPassword)) - { - writer.WritePropertyName("adminUserPassword"); - writer.WriteStringValue(AdminUserPassword); - } - writer.WriteEndObject(); - } - - internal static UserAccountCredentials DeserializeUserAccountCredentials(JsonElement element) - { - string adminUserName = default; - Optional adminUserSshPublicKey = default; - Optional adminUserPassword = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("adminUserName")) - { - adminUserName = property.Value.GetString(); - continue; - } - if (property.NameEquals("adminUserSshPublicKey")) - { - adminUserSshPublicKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("adminUserPassword")) - { - adminUserPassword = property.Value.GetString(); - continue; - } - } - return new UserAccountCredentials(adminUserName, adminUserSshPublicKey.Value, adminUserPassword.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserAccountCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserAccountCredentials.cs deleted file mode 100644 index 62b249d317e4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserAccountCredentials.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Settings for user account that gets created on each on the nodes of a compute. - public partial class UserAccountCredentials - { - /// Initializes a new instance of UserAccountCredentials. - /// Name of the administrator user account which can be used to SSH to nodes. - /// is null. - public UserAccountCredentials(string adminUserName) - { - Argument.AssertNotNull(adminUserName, nameof(adminUserName)); - - AdminUserName = adminUserName; - } - - /// Initializes a new instance of UserAccountCredentials. - /// Name of the administrator user account which can be used to SSH to nodes. - /// SSH public key of the administrator user account. - /// Password of the administrator user account. - internal UserAccountCredentials(string adminUserName, string adminUserSshPublicKey, string adminUserPassword) - { - AdminUserName = adminUserName; - AdminUserSshPublicKey = adminUserSshPublicKey; - AdminUserPassword = adminUserPassword; - } - - /// Name of the administrator user account which can be used to SSH to nodes. - public string AdminUserName { get; set; } - /// SSH public key of the administrator user account. - public string AdminUserSshPublicKey { get; set; } - /// Password of the administrator user account. - public string AdminUserPassword { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserIdentity.Serialization.cs deleted file mode 100644 index 7004ef2c3009..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserIdentity.Serialization.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UserIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("identityType"); - writer.WriteStringValue(IdentityType.ToString()); - writer.WriteEndObject(); - } - - internal static UserIdentity DeserializeUserIdentity(JsonElement element) - { - IdentityConfigurationType identityType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identityType")) - { - identityType = new IdentityConfigurationType(property.Value.GetString()); - continue; - } - } - return new UserIdentity(identityType); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserIdentity.cs deleted file mode 100644 index 690381ee242c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UserIdentity.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// User identity configuration. - public partial class UserIdentity : IdentityConfiguration - { - /// Initializes a new instance of UserIdentity. - public UserIdentity() - { - IdentityType = IdentityConfigurationType.UserIdentity; - } - - /// Initializes a new instance of UserIdentity. - /// [Required] Specifies the type of identity framework. - internal UserIdentity(IdentityConfigurationType identityType) : base(identityType) - { - IdentityType = identityType; - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.Serialization.cs deleted file mode 100644 index fe6d04df11bf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.Serialization.cs +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class UsernamePasswordAuthTypeWorkspaceConnectionProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Credentials)) - { - writer.WritePropertyName("credentials"); - writer.WriteObjectValue(Credentials); - } - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType.ToString()); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category.Value.ToString()); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - if (Optional.IsDefined(ValueFormat)) - { - writer.WritePropertyName("valueFormat"); - writer.WriteStringValue(ValueFormat.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static UsernamePasswordAuthTypeWorkspaceConnectionProperties DeserializeUsernamePasswordAuthTypeWorkspaceConnectionProperties(JsonElement element) - { - Optional credentials = default; - ConnectionAuthType authType = default; - Optional category = default; - Optional target = default; - Optional value = default; - Optional valueFormat = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - credentials = WorkspaceConnectionUsernamePassword.DeserializeWorkspaceConnectionUsernamePassword(property.Value); - continue; - } - if (property.NameEquals("authType")) - { - authType = new ConnectionAuthType(property.Value.GetString()); - continue; - } - if (property.NameEquals("category")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - category = new ConnectionCategory(property.Value.GetString()); - continue; - } - if (property.NameEquals("target")) - { - target = property.Value.GetString(); - continue; - } - if (property.NameEquals("value")) - { - value = property.Value.GetString(); - continue; - } - if (property.NameEquals("valueFormat")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - valueFormat = new ValueFormat(property.Value.GetString()); - continue; - } - } - return new UsernamePasswordAuthTypeWorkspaceConnectionProperties(authType, Optional.ToNullable(category), target.Value, value.Value, Optional.ToNullable(valueFormat), credentials.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.cs deleted file mode 100644 index 784276d63918..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The UsernamePasswordAuthTypeWorkspaceConnectionProperties. - public partial class UsernamePasswordAuthTypeWorkspaceConnectionProperties : WorkspaceConnectionPropertiesV2 - { - /// Initializes a new instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties. - public UsernamePasswordAuthTypeWorkspaceConnectionProperties() - { - AuthType = ConnectionAuthType.UsernamePassword; - } - - /// Initializes a new instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - /// - internal UsernamePasswordAuthTypeWorkspaceConnectionProperties(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat, WorkspaceConnectionUsernamePassword credentials) : base(authType, category, target, value, valueFormat) - { - Credentials = credentials; - AuthType = authType; - } - - /// Gets or sets the credentials. - public WorkspaceConnectionUsernamePassword Credentials { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValidationMetricType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValidationMetricType.cs index 29a4e1efbfe5..517afe88fb87 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValidationMetricType.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValidationMetricType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Metric computation method to use for validation metrics in image tasks. + /// + /// Metric computation method to use for validation metrics in image tasks. + /// Serialized Name: ValidationMetricType + /// public readonly partial struct ValidationMetricType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public ValidationMetricType(string value) private const string VocValue = "Voc"; private const string CocoVocValue = "CocoVoc"; - /// No metric. + /// + /// No metric. + /// Serialized Name: ValidationMetricType.None + /// public static ValidationMetricType None { get; } = new ValidationMetricType(NoneValue); - /// Coco metric. + /// + /// Coco metric. + /// Serialized Name: ValidationMetricType.Coco + /// public static ValidationMetricType Coco { get; } = new ValidationMetricType(CocoValue); - /// Voc metric. + /// + /// Voc metric. + /// Serialized Name: ValidationMetricType.Voc + /// public static ValidationMetricType Voc { get; } = new ValidationMetricType(VocValue); - /// CocoVoc metric. + /// + /// CocoVoc metric. + /// Serialized Name: ValidationMetricType.CocoVoc + /// public static ValidationMetricType CocoVoc { get; } = new ValidationMetricType(CocoVocValue); /// Determines if two values are the same. public static bool operator ==(ValidationMetricType left, ValidationMetricType right) => left.Equals(right); diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValueFormat.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValueFormat.cs deleted file mode 100644 index 6686d7d694a1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/ValueFormat.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// format for the workspace connection value. - public readonly partial struct ValueFormat : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ValueFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string JsonValue = "JSON"; - - /// JSON. - public static ValueFormat Json { get; } = new ValueFormat(JsonValue); - /// Determines if two values are the same. - public static bool operator ==(ValueFormat left, ValueFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ValueFormat left, ValueFormat right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ValueFormat(string value) => new ValueFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ValueFormat other && Equals(other); - /// - public bool Equals(ValueFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineCompute.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineCompute.Serialization.cs deleted file mode 100644 index a0c12097b19c..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineCompute.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.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class VirtualMachineCompute : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - } - writer.WritePropertyName("computeType"); - writer.WriteStringValue(ComputeType.ToString()); - if (Optional.IsDefined(ComputeLocation)) - { - writer.WritePropertyName("computeLocation"); - writer.WriteStringValue(ComputeLocation); - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(ResourceId)) - { - if (ResourceId != null) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - else - { - writer.WriteNull("resourceId"); - } - } - if (Optional.IsDefined(DisableLocalAuth)) - { - writer.WritePropertyName("disableLocalAuth"); - writer.WriteBooleanValue(DisableLocalAuth.Value); - } - writer.WriteEndObject(); - } - - internal static VirtualMachineCompute DeserializeVirtualMachineCompute(JsonElement element) - { - Optional properties = default; - ComputeType computeType = default; - Optional computeLocation = default; - Optional provisioningState = default; - Optional description = default; - Optional createdOn = default; - Optional modifiedOn = default; - Optional resourceId = default; - Optional> provisioningErrors = default; - Optional isAttachedCompute = default; - Optional disableLocalAuth = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - properties = VirtualMachineSchemaProperties.DeserializeVirtualMachineSchemaProperties(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("computeLocation")) - { - computeLocation = property.Value.GetString(); - continue; - } - if (property.NameEquals("provisioningState")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new ProvisioningState(property.Value.GetString()); - continue; - } - if (property.NameEquals("description")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - createdOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("modifiedOn")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - modifiedOn = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("resourceId")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - resourceId = null; - continue; - } - resourceId = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("provisioningErrors")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - provisioningErrors = null; - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ErrorResponse.DeserializeErrorResponse(item)); - } - provisioningErrors = array; - continue; - } - if (property.NameEquals("isAttachedCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isAttachedCompute = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("disableLocalAuth")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - disableLocalAuth = property.Value.GetBoolean(); - continue; - } - } - return new VirtualMachineCompute(computeType, computeLocation.Value, Optional.ToNullable(provisioningState), description.Value, Optional.ToNullable(createdOn), Optional.ToNullable(modifiedOn), resourceId.Value, Optional.ToList(provisioningErrors), Optional.ToNullable(isAttachedCompute), Optional.ToNullable(disableLocalAuth), properties.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineCompute.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineCompute.cs deleted file mode 100644 index 9c63e1dd2b96..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineCompute.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 -{ - /// A Machine Learning compute based on Azure Virtual Machines. - public partial class VirtualMachineCompute : Compute - { - /// Initializes a new instance of VirtualMachineCompute. - public VirtualMachineCompute() - { - ComputeType = ComputeType.VirtualMachine; - } - - /// Initializes a new instance of VirtualMachineCompute. - /// 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. - /// - internal VirtualMachineCompute(ComputeType computeType, string computeLocation, ProvisioningState? provisioningState, string description, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, ResourceIdentifier resourceId, IReadOnlyList provisioningErrors, bool? isAttachedCompute, bool? disableLocalAuth, VirtualMachineSchemaProperties properties) : base(computeType, computeLocation, provisioningState, description, createdOn, modifiedOn, resourceId, provisioningErrors, isAttachedCompute, disableLocalAuth) - { - Properties = properties; - ComputeType = computeType; - } - - /// Gets or sets the properties. - public VirtualMachineSchemaProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineImage.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineImage.cs index 4593e6a651ee..69b0c74ea74e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineImage.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineImage.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// Virtual Machine image for Windows AML Compute. + /// + /// Virtual Machine image for Windows AML Compute + /// Serialized Name: VirtualMachineImage + /// internal partial class VirtualMachineImage { /// Initializes a new instance of VirtualMachineImage. - /// Virtual Machine image path. + /// + /// Virtual Machine image path + /// Serialized Name: VirtualMachineImage.id + /// /// is null. public VirtualMachineImage(string id) { @@ -23,7 +29,10 @@ public VirtualMachineImage(string id) Id = id; } - /// Virtual Machine image path. + /// + /// Virtual Machine image path + /// Serialized Name: VirtualMachineImage.id + /// public string Id { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSchemaProperties.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSchemaProperties.Serialization.cs deleted file mode 100644 index 33ba64ef82da..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSchemaProperties.Serialization.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class VirtualMachineSchemaProperties : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(VirtualMachineSize)) - { - writer.WritePropertyName("virtualMachineSize"); - writer.WriteStringValue(VirtualMachineSize); - } - if (Optional.IsDefined(SshPort)) - { - writer.WritePropertyName("sshPort"); - writer.WriteNumberValue(SshPort.Value); - } - if (Optional.IsDefined(NotebookServerPort)) - { - writer.WritePropertyName("notebookServerPort"); - writer.WriteNumberValue(NotebookServerPort.Value); - } - if (Optional.IsDefined(Address)) - { - writer.WritePropertyName("address"); - writer.WriteStringValue(Address); - } - if (Optional.IsDefined(AdministratorAccount)) - { - if (AdministratorAccount != null) - { - writer.WritePropertyName("administratorAccount"); - writer.WriteObjectValue(AdministratorAccount); - } - else - { - writer.WriteNull("administratorAccount"); - } - } - if (Optional.IsDefined(IsNotebookInstanceCompute)) - { - writer.WritePropertyName("isNotebookInstanceCompute"); - writer.WriteBooleanValue(IsNotebookInstanceCompute.Value); - } - writer.WriteEndObject(); - } - - internal static VirtualMachineSchemaProperties DeserializeVirtualMachineSchemaProperties(JsonElement element) - { - Optional virtualMachineSize = default; - Optional sshPort = default; - Optional notebookServerPort = default; - Optional address = default; - Optional administratorAccount = default; - Optional isNotebookInstanceCompute = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("virtualMachineSize")) - { - virtualMachineSize = property.Value.GetString(); - continue; - } - if (property.NameEquals("sshPort")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - sshPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("notebookServerPort")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - notebookServerPort = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("address")) - { - address = property.Value.GetString(); - continue; - } - if (property.NameEquals("administratorAccount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - administratorAccount = null; - continue; - } - administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); - continue; - } - if (property.NameEquals("isNotebookInstanceCompute")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - isNotebookInstanceCompute = property.Value.GetBoolean(); - continue; - } - } - return new VirtualMachineSchemaProperties(virtualMachineSize.Value, Optional.ToNullable(sshPort), Optional.ToNullable(notebookServerPort), address.Value, administratorAccount.Value, Optional.ToNullable(isNotebookInstanceCompute)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSchemaProperties.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSchemaProperties.cs deleted file mode 100644 index a445ab08cddf..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSchemaProperties.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The VirtualMachineSchemaProperties. - public partial class VirtualMachineSchemaProperties - { - /// Initializes a new instance of VirtualMachineSchemaProperties. - public VirtualMachineSchemaProperties() - { - } - - /// Initializes a new instance of VirtualMachineSchemaProperties. - /// Virtual Machine size. - /// Port open for ssh connections. - /// Notebook server port open for ssh connections. - /// Public IP address of the virtual machine. - /// Admin credentials for virtual machine. - /// Indicates whether this compute will be used for running notebooks. - internal VirtualMachineSchemaProperties(string virtualMachineSize, int? sshPort, int? notebookServerPort, string address, VirtualMachineSshCredentials administratorAccount, bool? isNotebookInstanceCompute) - { - VirtualMachineSize = virtualMachineSize; - SshPort = sshPort; - NotebookServerPort = notebookServerPort; - Address = address; - AdministratorAccount = administratorAccount; - IsNotebookInstanceCompute = isNotebookInstanceCompute; - } - - /// Virtual Machine size. - public string VirtualMachineSize { get; set; } - /// Port open for ssh connections. - public int? SshPort { get; set; } - /// Notebook server port open for ssh connections. - public int? NotebookServerPort { get; set; } - /// Public IP address of the virtual machine. - public string Address { get; set; } - /// Admin credentials for virtual machine. - public VirtualMachineSshCredentials AdministratorAccount { get; set; } - /// Indicates whether this compute will be used for running notebooks. - public bool? IsNotebookInstanceCompute { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSecrets.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSecrets.Serialization.cs deleted file mode 100644 index 9a94066ce93b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSecrets.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class VirtualMachineSecrets - { - internal static VirtualMachineSecrets DeserializeVirtualMachineSecrets(JsonElement element) - { - Optional administratorAccount = default; - ComputeType computeType = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("administratorAccount")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - administratorAccount = VirtualMachineSshCredentials.DeserializeVirtualMachineSshCredentials(property.Value); - continue; - } - if (property.NameEquals("computeType")) - { - computeType = new ComputeType(property.Value.GetString()); - continue; - } - } - return new VirtualMachineSecrets(computeType, administratorAccount.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSecrets.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSecrets.cs deleted file mode 100644 index 0bf55a591e46..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSecrets.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Secrets related to a Machine Learning compute based on AKS. - public partial class VirtualMachineSecrets : ComputeSecrets - { - /// Initializes a new instance of VirtualMachineSecrets. - internal VirtualMachineSecrets() - { - ComputeType = ComputeType.VirtualMachine; - } - - /// Initializes a new instance of VirtualMachineSecrets. - /// The type of compute. - /// Admin credentials for virtual machine. - internal VirtualMachineSecrets(ComputeType computeType, VirtualMachineSshCredentials administratorAccount) : base(computeType) - { - AdministratorAccount = administratorAccount; - ComputeType = computeType; - } - - /// Admin credentials for virtual machine. - public VirtualMachineSshCredentials AdministratorAccount { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSize.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSize.Serialization.cs deleted file mode 100644 index 1c2fd04da584..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSize.Serialization.cs +++ /dev/null @@ -1,140 +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 Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class VirtualMachineSize - { - internal static VirtualMachineSize DeserializeVirtualMachineSize(JsonElement element) - { - Optional name = default; - Optional family = default; - Optional vcpUs = default; - Optional gpus = default; - Optional osVhdSizeMB = default; - Optional maxResourceVolumeMB = default; - Optional memoryGB = default; - Optional lowPriorityCapable = default; - Optional premiumIO = default; - Optional estimatedVmPrices = default; - Optional> supportedComputeTypes = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("family")) - { - family = property.Value.GetString(); - continue; - } - if (property.NameEquals("vCPUs")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - vcpUs = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("gpus")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - gpus = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("osVhdSizeMB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - osVhdSizeMB = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("maxResourceVolumeMB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - maxResourceVolumeMB = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("memoryGB")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - memoryGB = property.Value.GetDouble(); - continue; - } - if (property.NameEquals("lowPriorityCapable")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - lowPriorityCapable = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("premiumIO")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - premiumIO = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("estimatedVMPrices")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - estimatedVmPrices = EstimatedVmPrices.DeserializeEstimatedVmPrices(property.Value); - continue; - } - if (property.NameEquals("supportedComputeTypes")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - supportedComputeTypes = array; - continue; - } - } - return new VirtualMachineSize(name.Value, family.Value, Optional.ToNullable(vcpUs), Optional.ToNullable(gpus), Optional.ToNullable(osVhdSizeMB), Optional.ToNullable(maxResourceVolumeMB), Optional.ToNullable(memoryGB), Optional.ToNullable(lowPriorityCapable), Optional.ToNullable(premiumIO), estimatedVmPrices.Value, Optional.ToList(supportedComputeTypes)); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSize.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSize.cs deleted file mode 100644 index 1a20793abf61..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSize.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Describes the properties of a VM size. - public partial class VirtualMachineSize - { - /// Initializes a new instance of VirtualMachineSize. - internal VirtualMachineSize() - { - SupportedComputeTypes = new ChangeTrackingList(); - } - - /// Initializes a new instance of VirtualMachineSize. - /// 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. - internal VirtualMachineSize(string name, string family, int? vcpUs, int? gpus, int? osVhdSizeMB, int? maxResourceVolumeMB, double? memoryGB, bool? lowPriorityCapable, bool? premiumIO, EstimatedVmPrices estimatedVmPrices, IReadOnlyList supportedComputeTypes) - { - Name = name; - Family = family; - VCPUs = vcpUs; - Gpus = gpus; - OSVhdSizeMB = osVhdSizeMB; - MaxResourceVolumeMB = maxResourceVolumeMB; - MemoryGB = memoryGB; - LowPriorityCapable = lowPriorityCapable; - PremiumIO = premiumIO; - EstimatedVmPrices = estimatedVmPrices; - SupportedComputeTypes = supportedComputeTypes; - } - - /// The name of the virtual machine size. - public string Name { get; } - /// The family name of the virtual machine size. - public string Family { get; } - /// The number of vCPUs supported by the virtual machine size. - public int? VCPUs { get; } - /// The number of gPUs supported by the virtual machine size. - public int? Gpus { get; } - /// The OS VHD disk size, in MB, allowed by the virtual machine size. - public int? OSVhdSizeMB { get; } - /// The resource volume size, in MB, allowed by the virtual machine size. - public int? MaxResourceVolumeMB { get; } - /// The amount of memory, in GB, supported by the virtual machine size. - public double? MemoryGB { get; } - /// Specifies if the virtual machine size supports low priority VMs. - public bool? LowPriorityCapable { get; } - /// Specifies if the virtual machine size supports premium IO. - public bool? PremiumIO { get; } - /// The estimated price information for using a VM. - public EstimatedVmPrices EstimatedVmPrices { get; } - /// Specifies the compute types supported by the virtual machine size. - public IReadOnlyList SupportedComputeTypes { get; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs index 75030313f5ed..cb4ea99c7584 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.Serialization.cs @@ -15,7 +15,7 @@ internal partial class VirtualMachineSizeListResult { internal static VirtualMachineSizeListResult DeserializeVirtualMachineSizeListResult(JsonElement element) { - Optional> value = default; + Optional> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) @@ -25,10 +25,10 @@ internal static VirtualMachineSizeListResult DeserializeVirtualMachineSizeListRe property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(VirtualMachineSize.DeserializeVirtualMachineSize(item)); + array.Add(MachineLearningVmSize.DeserializeMachineLearningVmSize(item)); } value = array; continue; diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.cs index a09e5c7fa2b7..ceeb4030c85b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSizeListResult.cs @@ -10,23 +10,32 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The List Virtual Machine size operation response. + /// + /// The List Virtual Machine size operation response. + /// Serialized Name: VirtualMachineSizeListResult + /// internal partial class VirtualMachineSizeListResult { /// Initializes a new instance of VirtualMachineSizeListResult. internal VirtualMachineSizeListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of VirtualMachineSizeListResult. - /// The list of virtual machine sizes supported by AmlCompute. - internal VirtualMachineSizeListResult(IReadOnlyList value) + /// + /// The list of virtual machine sizes supported by AmlCompute. + /// Serialized Name: VirtualMachineSizeListResult.value + /// + internal VirtualMachineSizeListResult(IReadOnlyList value) { Value = value; } - /// The list of virtual machine sizes supported by AmlCompute. - public IReadOnlyList Value { get; } + /// + /// The list of virtual machine sizes supported by AmlCompute. + /// Serialized Name: VirtualMachineSizeListResult.value + /// + public IReadOnlyList Value { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs deleted file mode 100644 index 65cc8d9d3911..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSshCredentials.Serialization.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class VirtualMachineSshCredentials : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"); - writer.WriteStringValue(Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(Password); - } - if (Optional.IsDefined(PublicKeyData)) - { - writer.WritePropertyName("publicKeyData"); - writer.WriteStringValue(PublicKeyData); - } - if (Optional.IsDefined(PrivateKeyData)) - { - writer.WritePropertyName("privateKeyData"); - writer.WriteStringValue(PrivateKeyData); - } - writer.WriteEndObject(); - } - - internal static VirtualMachineSshCredentials DeserializeVirtualMachineSshCredentials(JsonElement element) - { - Optional username = default; - Optional password = default; - Optional publicKeyData = default; - Optional privateKeyData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("username")) - { - username = property.Value.GetString(); - continue; - } - if (property.NameEquals("password")) - { - password = property.Value.GetString(); - continue; - } - if (property.NameEquals("publicKeyData")) - { - publicKeyData = property.Value.GetString(); - continue; - } - if (property.NameEquals("privateKeyData")) - { - privateKeyData = property.Value.GetString(); - continue; - } - } - return new VirtualMachineSshCredentials(username.Value, password.Value, publicKeyData.Value, privateKeyData.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSshCredentials.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSshCredentials.cs deleted file mode 100644 index 9af61f241467..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VirtualMachineSshCredentials.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Admin credentials for virtual machine. - public partial class VirtualMachineSshCredentials - { - /// Initializes a new instance of VirtualMachineSshCredentials. - public VirtualMachineSshCredentials() - { - } - - /// Initializes a new instance of VirtualMachineSshCredentials. - /// Username of admin account. - /// Password of admin account. - /// Public key data. - /// Private key data. - internal VirtualMachineSshCredentials(string username, string password, string publicKeyData, string privateKeyData) - { - Username = username; - Password = password; - PublicKeyData = publicKeyData; - PrivateKeyData = privateKeyData; - } - - /// Username of admin account. - public string Username { get; set; } - /// Password of admin account. - public string Password { get; set; } - /// Public key data. - public string PublicKeyData { get; set; } - /// Private key data. - public string PrivateKeyData { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmPriceOSType.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmPriceOSType.cs deleted file mode 100644 index 403669192ce1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmPriceOSType.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 -{ - /// Operating system type used by the VM. - public readonly partial struct VmPriceOSType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VmPriceOSType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LinuxValue = "Linux"; - private const string WindowsValue = "Windows"; - - /// Linux. - public static VmPriceOSType Linux { get; } = new VmPriceOSType(LinuxValue); - /// Windows. - public static VmPriceOSType Windows { get; } = new VmPriceOSType(WindowsValue); - /// Determines if two values are the same. - public static bool operator ==(VmPriceOSType left, VmPriceOSType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VmPriceOSType left, VmPriceOSType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VmPriceOSType(string value) => new VmPriceOSType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VmPriceOSType other && Equals(other); - /// - public bool Equals(VmPriceOSType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmPriority.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmPriority.cs deleted file mode 100644 index 21f61c31f703..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmPriority.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 -{ - /// Virtual Machine priority. - public readonly partial struct VmPriority : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VmPriority(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DedicatedValue = "Dedicated"; - private const string LowPriorityValue = "LowPriority"; - - /// Dedicated. - public static VmPriority Dedicated { get; } = new VmPriority(DedicatedValue); - /// LowPriority. - public static VmPriority LowPriority { get; } = new VmPriority(LowPriorityValue); - /// Determines if two values are the same. - public static bool operator ==(VmPriority left, VmPriority right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VmPriority left, VmPriority right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VmPriority(string value) => new VmPriority(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VmPriority other && Equals(other); - /// - public bool Equals(VmPriority other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmTier.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmTier.cs deleted file mode 100644 index fbb5d90a8ec3..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/VmTier.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 type of the VM. - public readonly partial struct VmTier : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VmTier(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StandardValue = "Standard"; - private const string LowPriorityValue = "LowPriority"; - private const string SpotValue = "Spot"; - - /// Standard. - public static VmTier Standard { get; } = new VmTier(StandardValue); - /// LowPriority. - public static VmTier LowPriority { get; } = new VmTier(LowPriorityValue); - /// Spot. - public static VmTier Spot { get; } = new VmTier(SpotValue); - /// Determines if two values are the same. - public static bool operator ==(VmTier left, VmTier right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VmTier left, VmTier right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator VmTier(string value) => new VmTier(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VmTier other && Equals(other); - /// - public bool Equals(VmTier other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Weekday.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Weekday.cs deleted file mode 100644 index 84becb8762dc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/Weekday.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.ComponentModel; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// Enum of weekday. - public readonly partial struct WeekDay : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WeekDay(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MondayValue = "Monday"; - private const string TuesdayValue = "Tuesday"; - private const string WednesdayValue = "Wednesday"; - private const string ThursdayValue = "Thursday"; - private const string FridayValue = "Friday"; - private const string SaturdayValue = "Saturday"; - private const string SundayValue = "Sunday"; - - /// Monday weekday. - public static WeekDay Monday { get; } = new WeekDay(MondayValue); - /// Tuesday weekday. - public static WeekDay Tuesday { get; } = new WeekDay(TuesdayValue); - /// Wednesday weekday. - public static WeekDay Wednesday { get; } = new WeekDay(WednesdayValue); - /// Thursday weekday. - public static WeekDay Thursday { get; } = new WeekDay(ThursdayValue); - /// Friday weekday. - public static WeekDay Friday { get; } = new WeekDay(FridayValue); - /// Saturday weekday. - public static WeekDay Saturday { get; } = new WeekDay(SaturdayValue); - /// Sunday weekday. - public static WeekDay Sunday { get; } = new WeekDay(SundayValue); - /// Determines if two values are the same. - public static bool operator ==(WeekDay left, WeekDay right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WeekDay left, WeekDay right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator WeekDay(string value) => new WeekDay(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WeekDay other && Equals(other); - /// - public bool Equals(WeekDay other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionManagedIdentity.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionManagedIdentity.Serialization.cs deleted file mode 100644 index 3a19e5e1328d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionManagedIdentity.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class WorkspaceConnectionManagedIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(ResourceId)) - { - writer.WritePropertyName("resourceId"); - writer.WriteStringValue(ResourceId); - } - if (Optional.IsDefined(ClientId)) - { - writer.WritePropertyName("clientId"); - writer.WriteStringValue(ClientId); - } - writer.WriteEndObject(); - } - - internal static WorkspaceConnectionManagedIdentity DeserializeWorkspaceConnectionManagedIdentity(JsonElement element) - { - Optional resourceId = default; - Optional clientId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceId")) - { - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("clientId")) - { - clientId = property.Value.GetString(); - continue; - } - } - return new WorkspaceConnectionManagedIdentity(resourceId.Value, clientId.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionManagedIdentity.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionManagedIdentity.cs deleted file mode 100644 index e87fa205aa6b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionManagedIdentity.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The WorkspaceConnectionManagedIdentity. - public partial class WorkspaceConnectionManagedIdentity - { - /// Initializes a new instance of WorkspaceConnectionManagedIdentity. - public WorkspaceConnectionManagedIdentity() - { - } - - /// Initializes a new instance of WorkspaceConnectionManagedIdentity. - /// - /// - internal WorkspaceConnectionManagedIdentity(string resourceId, string clientId) - { - ResourceId = resourceId; - ClientId = clientId; - } - - /// Gets or sets the resource id. - public string 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/WorkspaceConnectionPersonalAccessToken.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPersonalAccessToken.cs index 0c6ac028232a..eaacb2179676 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPersonalAccessToken.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPersonalAccessToken.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The WorkspaceConnectionPersonalAccessToken. + /// + /// The WorkspaceConnectionPersonalAccessToken. + /// Serialized Name: WorkspaceConnectionPersonalAccessToken + /// internal partial class WorkspaceConnectionPersonalAccessToken { /// Initializes a new instance of WorkspaceConnectionPersonalAccessToken. @@ -16,13 +19,13 @@ public WorkspaceConnectionPersonalAccessToken() } /// Initializes a new instance of WorkspaceConnectionPersonalAccessToken. - /// + /// Serialized Name: WorkspaceConnectionPersonalAccessToken.pat. internal WorkspaceConnectionPersonalAccessToken(string pat) { Pat = pat; } - /// Gets or sets the pat. + /// Serialized Name: WorkspaceConnectionPersonalAccessToken.pat. public string Pat { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2.Serialization.cs deleted file mode 100644 index 2b51d9d5cd36..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2.Serialization.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class WorkspaceConnectionPropertiesV2 : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("authType"); - writer.WriteStringValue(AuthType.ToString()); - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"); - writer.WriteStringValue(Category.Value.ToString()); - } - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"); - writer.WriteStringValue(Target); - } - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"); - writer.WriteStringValue(Value); - } - if (Optional.IsDefined(ValueFormat)) - { - writer.WritePropertyName("valueFormat"); - writer.WriteStringValue(ValueFormat.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static WorkspaceConnectionPropertiesV2 DeserializeWorkspaceConnectionPropertiesV2(JsonElement element) - { - if (element.TryGetProperty("authType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "ManagedIdentity": return ManagedIdentityAuthTypeWorkspaceConnectionProperties.DeserializeManagedIdentityAuthTypeWorkspaceConnectionProperties(element); - case "None": return NoneAuthTypeWorkspaceConnectionProperties.DeserializeNoneAuthTypeWorkspaceConnectionProperties(element); - case "PAT": return PATAuthTypeWorkspaceConnectionProperties.DeserializePATAuthTypeWorkspaceConnectionProperties(element); - case "SAS": return SASAuthTypeWorkspaceConnectionProperties.DeserializeSASAuthTypeWorkspaceConnectionProperties(element); - case "UsernamePassword": return UsernamePasswordAuthTypeWorkspaceConnectionProperties.DeserializeUsernamePasswordAuthTypeWorkspaceConnectionProperties(element); - } - } - return UnknownWorkspaceConnectionPropertiesV2.DeserializeUnknownWorkspaceConnectionPropertiesV2(element); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2.cs deleted file mode 100644 index 09a7d740652b..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// - /// The WorkspaceConnectionPropertiesV2. - /// Please note is the base class. According to the scenario, a derived class 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 WorkspaceConnectionPropertiesV2 - { - /// Initializes a new instance of WorkspaceConnectionPropertiesV2. - protected WorkspaceConnectionPropertiesV2() - { - } - - /// Initializes a new instance of WorkspaceConnectionPropertiesV2. - /// Authentication type of the connection target. - /// Category of the connection. - /// - /// Value details of the workspace connection. - /// format for the workspace connection value. - internal WorkspaceConnectionPropertiesV2(ConnectionAuthType authType, ConnectionCategory? category, string target, string value, ValueFormat? valueFormat) - { - AuthType = authType; - Category = category; - Target = target; - Value = value; - ValueFormat = valueFormat; - } - - /// Authentication type of the connection target. - internal ConnectionAuthType AuthType { get; set; } - /// Category of the connection. - public ConnectionCategory? Category { get; set; } - /// Gets or sets the target. - public string Target { get; set; } - /// Value details of the workspace connection. - public string Value { get; set; } - /// format for the workspace connection value. - public ValueFormat? ValueFormat { get; set; } - } -} 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 ef563081ec91..edd9ecee3f44 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 @@ -16,7 +16,7 @@ internal partial class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedR { internal static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult DeserializeWorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult D property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(WorkspaceConnectionPropertiesV2BasicResourceData.DeserializeWorkspaceConnectionPropertiesV2BasicResourceData(item)); + array.Add(MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(item)); } value = array; continue; 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 901bc975844b..367506927da7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.cs @@ -11,27 +11,30 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. + /// + /// The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult + /// internal partial class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult { /// Initializes a new instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } /// Initializes a new instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult. - /// - /// - internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(IReadOnlyList value, string nextLink) + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.value. + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.nextLink. + internal WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// Gets the value. - public IReadOnlyList Value { get; } - /// Gets the next link. + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.value. + public IReadOnlyList Value { get; } + /// Serialized Name: WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.nextLink. public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceData.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceData.Serialization.cs deleted file mode 100644 index 909cfe897ac4..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionPropertiesV2BasicResourceData.Serialization.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - public partial class WorkspaceConnectionPropertiesV2BasicResourceData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WritePropertyName("properties"); - writer.WriteObjectValue(Properties); - writer.WriteEndObject(); - } - - internal static WorkspaceConnectionPropertiesV2BasicResourceData DeserializeWorkspaceConnectionPropertiesV2BasicResourceData(JsonElement element) - { - WorkspaceConnectionPropertiesV2 properties = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - Optional systemData = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("properties")) - { - properties = WorkspaceConnectionPropertiesV2.DeserializeWorkspaceConnectionPropertiesV2(property.Value); - continue; - } - if (property.NameEquals("id")) - { - id = new ResourceIdentifier(property.Value.GetString()); - continue; - } - if (property.NameEquals("name")) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type")) - { - type = new ResourceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - } - return new WorkspaceConnectionPropertiesV2BasicResourceData(id, name, type, systemData.Value, properties); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionSharedAccessSignature.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionSharedAccessSignature.cs index b2aa420718dd..27b4fc124f1a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionSharedAccessSignature.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionSharedAccessSignature.cs @@ -7,7 +7,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The WorkspaceConnectionSharedAccessSignature. + /// + /// The WorkspaceConnectionSharedAccessSignature. + /// Serialized Name: WorkspaceConnectionSharedAccessSignature + /// internal partial class WorkspaceConnectionSharedAccessSignature { /// Initializes a new instance of WorkspaceConnectionSharedAccessSignature. @@ -16,13 +19,13 @@ public WorkspaceConnectionSharedAccessSignature() } /// Initializes a new instance of WorkspaceConnectionSharedAccessSignature. - /// + /// Serialized Name: WorkspaceConnectionSharedAccessSignature.sas. internal WorkspaceConnectionSharedAccessSignature(string sas) { Sas = sas; } - /// Gets or sets the sas. + /// Serialized Name: WorkspaceConnectionSharedAccessSignature.sas. public string Sas { get; set; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionUsernamePassword.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionUsernamePassword.Serialization.cs deleted file mode 100644 index 3f2fd5446fd2..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionUsernamePassword.Serialization.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.MachineLearning.Models -{ - public partial class WorkspaceConnectionUsernamePassword : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Username)) - { - writer.WritePropertyName("username"); - writer.WriteStringValue(Username); - } - if (Optional.IsDefined(Password)) - { - writer.WritePropertyName("password"); - writer.WriteStringValue(Password); - } - writer.WriteEndObject(); - } - - internal static WorkspaceConnectionUsernamePassword DeserializeWorkspaceConnectionUsernamePassword(JsonElement element) - { - Optional username = default; - Optional password = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("username")) - { - username = property.Value.GetString(); - continue; - } - if (property.NameEquals("password")) - { - password = property.Value.GetString(); - continue; - } - } - return new WorkspaceConnectionUsernamePassword(username.Value, password.Value); - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionUsernamePassword.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionUsernamePassword.cs deleted file mode 100644 index 8da0ffbcff7a..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceConnectionUsernamePassword.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.MachineLearning.Models -{ - /// The WorkspaceConnectionUsernamePassword. - public partial class WorkspaceConnectionUsernamePassword - { - /// Initializes a new instance of WorkspaceConnectionUsernamePassword. - public WorkspaceConnectionUsernamePassword() - { - } - - /// Initializes a new instance of WorkspaceConnectionUsernamePassword. - /// - /// - internal WorkspaceConnectionUsernamePassword(string username, string password) - { - Username = username; - Password = password; - } - - /// Gets or sets the username. - public string Username { get; set; } - /// Gets or sets the password. - public string Password { get; set; } - } -} 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 e69019b0282c..70f08b3b4b03 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/Models/WorkspaceListResult.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.MachineLearning.Models { - /// The result of a request to list machine learning workspaces. + /// + /// The result of a request to list machine learning workspaces. + /// Serialized Name: WorkspaceListResult + /// internal partial class WorkspaceListResult { /// Initializes a new instance of WorkspaceListResult. @@ -21,17 +24,29 @@ internal WorkspaceListResult() } /// Initializes a new instance of WorkspaceListResult. - /// 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. + /// + /// 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. + /// Serialized Name: WorkspaceListResult.value + /// + /// + /// The URI that can be used to request the next list of machine learning workspaces. + /// Serialized Name: WorkspaceListResult.nextLink + /// internal WorkspaceListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } - /// 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 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. + /// Serialized Name: WorkspaceListResult.value + /// public IReadOnlyList Value { get; } - /// The URI that can 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. + /// Serialized Name: WorkspaceListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentCollection.cs deleted file mode 100644 index 62b622c02ab0..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentCollection.cs +++ /dev/null @@ -1,339 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetOnlineDeployments method from an instance of . - /// - public partial class OnlineDeploymentCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _onlineDeploymentClientDiagnostics; - private readonly OnlineDeploymentsRestOperations _onlineDeploymentRestClient; - - /// Initializes a new instance of the class for mocking. - protected OnlineDeploymentCollection() - { - } - - /// 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 OnlineDeploymentCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _onlineDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", OnlineDeploymentResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(OnlineDeploymentResource.ResourceType, out string onlineDeploymentApiVersion); - _onlineDeploymentRestClient = new OnlineDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, onlineDeploymentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != OnlineEndpointResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, OnlineEndpointResource.ResourceType), nameof(id)); - } - - /// - /// Create or update Inference Endpoint Deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_CreateOrUpdate - /// - /// 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. - /// Inference Endpoint Deployment name. - /// Inference Endpoint entity to apply during operation. - /// 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, OnlineDeploymentData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new OnlineDeploymentOperationSource(Client), _onlineDeploymentClientDiagnostics, Pipeline, _onlineDeploymentRestClient.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 Inference Endpoint Deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_CreateOrUpdate - /// - /// 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. - /// Inference Endpoint Deployment name. - /// Inference Endpoint entity to apply during operation. - /// 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, OnlineDeploymentData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, deploymentName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new OnlineDeploymentOperationSource(Client), _onlineDeploymentClientDiagnostics, Pipeline, _onlineDeploymentRestClient.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 Inference Deployment Deployment. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// Inference Endpoint Deployment name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.Get"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.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 OnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Inference Deployment Deployment. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// Inference Endpoint Deployment name. - /// 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 = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.Get"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.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 OnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List Inference Endpoint Deployments. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments - /// Operation Id: OnlineDeployments_List - /// - /// Ordering of list. - /// Top of list. - /// 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 GetAllAsync(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new OnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new OnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List Inference Endpoint Deployments. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments - /// Operation Id: OnlineDeployments_List - /// - /// Ordering of list. - /// Top of list. - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string orderBy = null, int? top = null, string skip = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new OnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.GetAll"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, orderBy, top, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new OnlineDeploymentResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// Inference Endpoint Deployment name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string deploymentName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(deploymentName, nameof(deploymentName)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.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}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// Inference Endpoint Deployment name. - /// 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 = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentCollection.Exists"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.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; - } - } - - 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/OnlineDeploymentData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentData.cs deleted file mode 100644 index 670300286fbc..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentData.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; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the OnlineDeployment data model. - public partial class OnlineDeploymentData : TrackedResourceData - { - /// Initializes a new instance of OnlineDeploymentData. - /// The location. - /// - /// [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 . - /// - /// is null. - public OnlineDeploymentData(AzureLocation location, OnlineDeploymentProperties properties) : base(location) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of OnlineDeploymentData. - /// 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. - /// Please note is the base class. According to the scenario, a derived class 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 . - /// - /// Sku details required for ARM contract for Autoscaling. - internal OnlineDeploymentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, OnlineDeploymentProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - Kind = kind; - Properties = properties; - Sku = sku; - } - - /// 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 OnlineDeploymentProperties Properties { 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/OnlineDeploymentResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentResource.cs deleted file mode 100644 index a0e6fb3e3d28..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineDeploymentResource.cs +++ /dev/null @@ -1,653 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing an OnlineDeployment 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 GetOnlineDeploymentResource method. - /// Otherwise you can get one from its parent resource using the GetOnlineDeployment method. - /// - public partial class OnlineDeploymentResource : ArmResource - { - /// Generate the resource identifier of a instance. - 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}/onlineEndpoints/{endpointName}/deployments/{deploymentName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _onlineDeploymentClientDiagnostics; - private readonly OnlineDeploymentsRestOperations _onlineDeploymentRestClient; - private readonly OnlineDeploymentData _data; - - /// Initializes a new instance of the class for mocking. - protected OnlineDeploymentResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal OnlineDeploymentResource(ArmClient client, OnlineDeploymentData 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 OnlineDeploymentResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _onlineDeploymentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string onlineDeploymentApiVersion); - _onlineDeploymentRestClient = new OnlineDeploymentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, onlineDeploymentApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments"; - - /// 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 OnlineDeploymentData 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 Inference Deployment Deployment. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.Get"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.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 OnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Inference Deployment Deployment. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.Get"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.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 OnlineDeploymentResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Inference Endpoint Deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Delete - /// - /// 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 = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.Delete"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_onlineDeploymentClientDiagnostics, Pipeline, _onlineDeploymentRestClient.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 Inference Endpoint Deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Delete - /// - /// 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 = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.Delete"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_onlineDeploymentClientDiagnostics, Pipeline, _onlineDeploymentRestClient.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 Online Deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Update - /// - /// 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. - /// Online Endpoint entity to apply during operation. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, OnlineDeploymentPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.Update"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new OnlineDeploymentOperationSource(Client), _onlineDeploymentClientDiagnostics, Pipeline, _onlineDeploymentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update Online Deployment (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Update - /// - /// 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. - /// Online Endpoint entity to apply during operation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, OnlineDeploymentPatch patch, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(patch, nameof(patch)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.Update"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); - var operation = new MachineLearningArmOperation(new OnlineDeploymentOperationSource(Client), _onlineDeploymentClientDiagnostics, Pipeline, _onlineDeploymentRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Polls an Endpoint operation. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs - /// Operation Id: OnlineDeployments_GetLogs - /// - /// The request containing parameters for retrieving logs. - /// The cancellation token to use. - /// is null. - public virtual async Task> GetLogsAsync(DeploymentLogsContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.GetLogs"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.GetLogsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Polls an Endpoint operation. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs - /// Operation Id: OnlineDeployments_GetLogs - /// - /// The request containing parameters for retrieving logs. - /// The cancellation token to use. - /// is null. - public virtual Response GetLogs(DeploymentLogsContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.GetLogs"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.GetLogs(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List Inference Endpoint Deployment Skus. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus - /// Operation Id: OnlineDeployments_ListSkus - /// - /// Number of Skus to be retrieved in a page of results. - /// 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 GetSkusAsync(int? count = null, string skip = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.GetSkus"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.ListSkusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.GetSkus"); - scope.Start(); - try - { - var response = await _onlineDeploymentRestClient.ListSkusNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List Inference Endpoint Deployment Skus. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus - /// Operation Id: OnlineDeployments_ListSkus - /// - /// Number of Skus to be retrieved in a page of results. - /// Continuation token for pagination. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSkus(int? count = null, string skip = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.GetSkus"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.ListSkus(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.GetSkus"); - scope.Start(); - try - { - var response = _onlineDeploymentRestClient.ListSkusNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, count, skip, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _onlineDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new OnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new OnlineDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _onlineDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new OnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new OnlineDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _onlineDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new OnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new OnlineDeploymentPatch(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _onlineDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new OnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new OnlineDeploymentPatch(); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _onlineDeploymentRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new OnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new OnlineDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _onlineDeploymentClientDiagnostics.CreateScope("OnlineDeploymentResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _onlineDeploymentRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new OnlineDeploymentResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new OnlineDeploymentPatch(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointCollection.cs deleted file mode 100644 index f7e2221ed74d..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointCollection.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.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 GetOnlineEndpoints method from an instance of . - /// - public partial class OnlineEndpointCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _onlineEndpointClientDiagnostics; - private readonly OnlineEndpointsRestOperations _onlineEndpointRestClient; - - /// Initializes a new instance of the class for mocking. - protected OnlineEndpointCollection() - { - } - - /// 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 OnlineEndpointCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _onlineEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", OnlineEndpointResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(OnlineEndpointResource.ResourceType, out string onlineEndpointApiVersion); - _onlineEndpointRestClient = new OnlineEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, onlineEndpointApiVersion); -#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 Online Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_CreateOrUpdate - /// - /// 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. - /// Online Endpoint name. - /// Online Endpoint entity to apply during operation. - /// 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, OnlineEndpointData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new OnlineEndpointOperationSource(Client), _onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.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 Online Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_CreateOrUpdate - /// - /// 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. - /// Online Endpoint name. - /// Online Endpoint entity to apply during operation. - /// 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, OnlineEndpointData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, data, cancellationToken); - var operation = new MachineLearningArmOperation(new OnlineEndpointOperationSource(Client), _onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.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; - } - } - - /// - /// Get Online Endpoint. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// Online Endpoint name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.Get"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new OnlineEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Online Endpoint. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// Online Endpoint name. - /// 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 = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.Get"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, endpointName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new OnlineEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List Online Endpoints. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints - /// Operation Id: OnlineEndpoints_List - /// - /// Name of the endpoint. - /// Number of endpoints to be retrieved in a page of results. - /// EndpointComputeType to be filtered by. - /// Continuation token for pagination. - /// A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// The option to order the response. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string name = null, int? count = null, EndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, OrderString? orderBy = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new OnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new OnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List Online Endpoints. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints - /// Operation Id: OnlineEndpoints_List - /// - /// Name of the endpoint. - /// Number of endpoints to be retrieved in a page of results. - /// EndpointComputeType to be filtered by. - /// Continuation token for pagination. - /// A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - /// A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - /// The option to order the response. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string name = null, int? count = null, EndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, OrderString? orderBy = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new OnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.GetAll"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, count, computeType, skip, tags, properties, orderBy, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new OnlineEndpointResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// Online Endpoint name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string endpointName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(endpointName, nameof(endpointName)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.Exists"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.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}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// Online Endpoint name. - /// 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 = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointCollection.Exists"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.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; - } - } - - 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/OnlineEndpointData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointData.cs deleted file mode 100644 index 73ab6f5508ab..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointData.cs +++ /dev/null @@ -1,58 +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 OnlineEndpoint data model. - public partial class OnlineEndpointData : TrackedResourceData - { - /// Initializes a new instance of OnlineEndpointData. - /// The location. - /// [Required] Additional attributes of the entity. - /// is null. - public OnlineEndpointData(AzureLocation location, OnlineEndpointProperties properties) : base(location) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of OnlineEndpointData. - /// 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. - internal OnlineEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string kind, OnlineEndpointProperties properties, MachineLearningSku sku) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - Kind = kind; - Properties = properties; - Sku = sku; - } - - /// 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 OnlineEndpointProperties Properties { 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/OnlineEndpointResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointResource.cs deleted file mode 100644 index 0bb74b8204c8..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/OnlineEndpointResource.cs +++ /dev/null @@ -1,698 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.MachineLearning.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing an OnlineEndpoint 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 GetOnlineEndpointResource method. - /// Otherwise you can get one from its parent resource using the GetOnlineEndpoint method. - /// - public partial class OnlineEndpointResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _onlineEndpointClientDiagnostics; - private readonly OnlineEndpointsRestOperations _onlineEndpointRestClient; - private readonly OnlineEndpointData _data; - - /// Initializes a new instance of the class for mocking. - protected OnlineEndpointResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal OnlineEndpointResource(ArmClient client, OnlineEndpointData 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 OnlineEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _onlineEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string onlineEndpointApiVersion); - _onlineEndpointRestClient = new OnlineEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, onlineEndpointApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/onlineEndpoints"; - - /// 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 OnlineEndpointData 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 OnlineDeploymentResources in the OnlineEndpoint. - /// An object representing collection of OnlineDeploymentResources and their operations over a OnlineDeploymentResource. - public virtual OnlineDeploymentCollection GetOnlineDeployments() - { - return GetCachedClient(Client => new OnlineDeploymentCollection(Client, Id)); - } - - /// - /// Get Inference Deployment Deployment. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// Inference Endpoint Deployment name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetOnlineDeploymentAsync(string deploymentName, CancellationToken cancellationToken = default) - { - return await GetOnlineDeployments().GetAsync(deploymentName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get Inference Deployment Deployment. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName} - /// Operation Id: OnlineDeployments_Get - /// - /// Inference Endpoint Deployment name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetOnlineDeployment(string deploymentName, CancellationToken cancellationToken = default) - { - return GetOnlineDeployments().Get(deploymentName, cancellationToken); - } - - /// - /// Get Online Endpoint. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.Get"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.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 OnlineEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get Online Endpoint. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.Get"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new OnlineEndpointResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Online Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Delete - /// - /// 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 = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.Delete"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete Online Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Delete - /// - /// 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 = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.Delete"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update Online Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Update - /// - /// 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. - /// Online Endpoint entity to apply during operation. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.Update"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new OnlineEndpointOperationSource(Client), _onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update Online Endpoint (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Update - /// - /// 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. - /// Online Endpoint entity to apply during operation. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.Update"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); - var operation = new MachineLearningArmOperation(new OnlineEndpointOperationSource(Client), _onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List EndpointAuthKeys for an Endpoint using Key-based authentication. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys - /// Operation Id: OnlineEndpoints_ListKeys - /// - /// The cancellation token to use. - public virtual async Task> GetKeysAsync(CancellationToken cancellationToken = default) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.GetKeys"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.ListKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List EndpointAuthKeys for an Endpoint using Key-based authentication. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys - /// Operation Id: OnlineEndpoints_ListKeys - /// - /// The cancellation token to use. - public virtual Response GetKeys(CancellationToken cancellationToken = default) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.GetKeys"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.ListKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys - /// Operation Id: OnlineEndpoints_RegenerateKeys - /// - /// 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. - /// RegenerateKeys request . - /// The cancellation token to use. - /// is null. - public virtual async Task RegenerateKeysAsync(WaitUntil waitUntil, RegenerateEndpointKeysContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.RegenerateKeys"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.RegenerateKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.CreateRegenerateKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys - /// Operation Id: OnlineEndpoints_RegenerateKeys - /// - /// 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. - /// RegenerateKeys request . - /// The cancellation token to use. - /// is null. - public virtual ArmOperation RegenerateKeys(WaitUntil waitUntil, RegenerateEndpointKeysContent content, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.RegenerateKeys"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.RegenerateKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new MachineLearningArmOperation(_onlineEndpointClientDiagnostics, Pipeline, _onlineEndpointRestClient.CreateRegenerateKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token - /// Operation Id: OnlineEndpoints_GetToken - /// - /// The cancellation token to use. - public virtual async Task> GetTokenAsync(CancellationToken cancellationToken = default) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.GetToken"); - scope.Start(); - try - { - var response = await _onlineEndpointRestClient.GetTokenAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Retrieve a valid AAD token for an Endpoint using AMLToken-based authentication. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token - /// Operation Id: OnlineEndpoints_GetToken - /// - /// The cancellation token to use. - public virtual Response GetToken(CancellationToken cancellationToken = default) - { - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.GetToken"); - scope.Start(); - try - { - var response = _onlineEndpointRestClient.GetToken(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _onlineEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new OnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _onlineEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new OnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _onlineEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new OnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _onlineEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new OnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - patch.Tags.ReplaceWith(tags); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _onlineEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new OnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName} - /// Operation Id: OnlineEndpoints_Get - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _onlineEndpointClientDiagnostics.CreateScope("OnlineEndpointResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _onlineEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - return Response.FromValue(new OnlineEndpointResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new PartialMinimalTrackedResourceWithIdentity(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); - return Response.FromValue(result.Value, result.GetRawResponse()); - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} 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 029df6724c4b..394b8b4ba5eb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchDeploymentsRestOperations.cs @@ -257,7 +257,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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) + 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)); @@ -271,13 +271,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - BatchDeploymentData value = default; + MachineLearningBatchDeploymentData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BatchDeploymentData.DeserializeBatchDeploymentData(document.RootElement); + value = MachineLearningBatchDeploymentData.DeserializeMachineLearningBatchDeploymentData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BatchDeploymentData)null, message.Response); + return Response.FromValue((MachineLearningBatchDeploymentData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -292,7 +292,7 @@ public async Task> GetAsync(string subscriptionId, /// 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) + 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)); @@ -306,19 +306,19 @@ public Response Get(string subscriptionId, string resourceG { case 200: { - BatchDeploymentData value = default; + MachineLearningBatchDeploymentData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BatchDeploymentData.DeserializeBatchDeploymentData(document.RootElement); + value = MachineLearningBatchDeploymentData.DeserializeMachineLearningBatchDeploymentData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BatchDeploymentData)null, message.Response); + return Response.FromValue((MachineLearningBatchDeploymentData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, BatchDeploymentPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningBatchDeploymentPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -356,7 +356,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , , 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 endpointName, string deploymentName, BatchDeploymentPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningBatchDeploymentPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -387,7 +387,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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, string endpointName, string deploymentName, BatchDeploymentPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningBatchDeploymentPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -408,7 +408,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, BatchDeploymentData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningBatchDeploymentData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -446,7 +446,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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, BatchDeploymentData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningBatchDeploymentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -477,7 +477,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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, BatchDeploymentData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningBatchDeploymentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); 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 71bd55afb5e4..7f12870bf562 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/BatchEndpointsRestOperations.cs @@ -236,7 +236,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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) + 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)); @@ -249,13 +249,13 @@ public async Task> GetAsync(string subscriptionId, s { case 200: { - BatchEndpointData value = default; + MachineLearningBatchEndpointData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = BatchEndpointData.DeserializeBatchEndpointData(document.RootElement); + value = MachineLearningBatchEndpointData.DeserializeMachineLearningBatchEndpointData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BatchEndpointData)null, message.Response); + return Response.FromValue((MachineLearningBatchEndpointData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -269,7 +269,7 @@ public async Task> GetAsync(string subscriptionId, s /// 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) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -282,19 +282,19 @@ public Response Get(string subscriptionId, string resourceGro { case 200: { - BatchEndpointData value = default; + MachineLearningBatchEndpointData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = BatchEndpointData.DeserializeBatchEndpointData(document.RootElement); + value = MachineLearningBatchEndpointData.DeserializeMachineLearningBatchEndpointData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((BatchEndpointData)null, message.Response); + return Response.FromValue((MachineLearningBatchEndpointData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, PartialMinimalTrackedResourceWithIdentity body) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningResourcePatchWithIdentity body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -329,7 +329,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , 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 endpointName, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -358,7 +358,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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, string endpointName, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -378,7 +378,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, BatchEndpointData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningBatchEndpointData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -413,7 +413,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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, BatchEndpointData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningBatchEndpointData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -442,7 +442,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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, BatchEndpointData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningBatchEndpointData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -493,7 +493,7 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc /// 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) + 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)); @@ -506,9 +506,9 @@ public async Task> ListKeysAsync(string subscriptionI { case 200: { - EndpointAuthKeys value = default; + MachineLearningEndpointAuthKeys value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointAuthKeys.DeserializeEndpointAuthKeys(document.RootElement); + value = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -524,7 +524,7 @@ public async Task> ListKeysAsync(string subscriptionI /// 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) + public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -537,9 +537,9 @@ public Response ListKeys(string subscriptionId, string resourc { case 200: { - EndpointAuthKeys value = default; + MachineLearningEndpointAuthKeys value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointAuthKeys.DeserializeEndpointAuthKeys(document.RootElement); + value = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 07f102b379d1..12cdbac72261 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeContainersRestOperations.cs @@ -228,7 +228,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -241,13 +241,13 @@ public async Task> GetAsync(string subscriptionId, s { case 200: { - CodeContainerData value = default; + MachineLearningCodeContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeContainerData.DeserializeCodeContainerData(document.RootElement); + value = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((CodeContainerData)null, message.Response); + return Response.FromValue((MachineLearningCodeContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -261,7 +261,7 @@ public async Task> GetAsync(string subscriptionId, s /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -274,19 +274,19 @@ public Response Get(string subscriptionId, string resourceGro { case 200: { - CodeContainerData value = default; + MachineLearningCodeContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeContainerData.DeserializeCodeContainerData(document.RootElement); + value = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((CodeContainerData)null, message.Response); + return Response.FromValue((MachineLearningCodeContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, CodeContainerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningCodeContainerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -321,7 +321,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, CodeContainerData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -336,9 +336,9 @@ public async Task> CreateOrUpdateAsync(string subscr case 200: case 201: { - CodeContainerData value = default; + MachineLearningCodeContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeContainerData.DeserializeCodeContainerData(document.RootElement); + value = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -355,7 +355,7 @@ public async Task> CreateOrUpdateAsync(string subscr /// 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 name, CodeContainerData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningCodeContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -370,9 +370,9 @@ public Response CreateOrUpdate(string subscriptionId, string case 200: case 201: { - CodeContainerData value = default; + MachineLearningCodeContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeContainerData.DeserializeCodeContainerData(document.RootElement); + value = MachineLearningCodeContainerData.DeserializeMachineLearningCodeContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 929ce0818005..8238aae9d08a 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/CodeVersionsRestOperations.cs @@ -255,7 +255,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, string version, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -269,13 +269,13 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - CodeVersionData value = default; + MachineLearningCodeVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeVersionData.DeserializeCodeVersionData(document.RootElement); + value = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((CodeVersionData)null, message.Response); + return Response.FromValue((MachineLearningCodeVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -290,7 +290,7 @@ public async Task> GetAsync(string subscriptionId, str /// 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 name, string version, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -304,19 +304,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - CodeVersionData value = default; + MachineLearningCodeVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeVersionData.DeserializeCodeVersionData(document.RootElement); + value = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((CodeVersionData)null, message.Response); + return Response.FromValue((MachineLearningCodeVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CodeVersionData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningCodeVersionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -354,7 +354,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, string version, CodeVersionData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -370,9 +370,9 @@ public async Task> CreateOrUpdateAsync(string subscrip case 200: case 201: { - CodeVersionData value = default; + MachineLearningCodeVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = CodeVersionData.DeserializeCodeVersionData(document.RootElement); + value = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -390,7 +390,7 @@ public async Task> CreateOrUpdateAsync(string subscrip /// 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 name, string version, CodeVersionData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningCodeVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -406,9 +406,9 @@ public Response CreateOrUpdate(string subscriptionId, string re case 200: case 201: { - CodeVersionData value = default; + MachineLearningCodeVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = CodeVersionData.DeserializeCodeVersionData(document.RootElement); + value = MachineLearningCodeVersionData.DeserializeMachineLearningCodeVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 cd5f484b8bb1..d56b8d8598cb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentContainersRestOperations.cs @@ -37,7 +37,7 @@ public ComponentContainersRestOperations(HttpPipeline pipeline, string applicati _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -75,7 +75,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,7 +106,7 @@ public async Task> ListAs /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -234,7 +234,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -247,13 +247,13 @@ public async Task> GetAsync(string subscription { case 200: { - ComponentContainerData value = default; + MachineLearningComponentContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ComponentContainerData.DeserializeComponentContainerData(document.RootElement); + value = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ComponentContainerData)null, message.Response); + return Response.FromValue((MachineLearningComponentContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -267,7 +267,7 @@ public async Task> GetAsync(string subscription /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,19 +280,19 @@ public Response Get(string subscriptionId, string resour { case 200: { - ComponentContainerData value = default; + MachineLearningComponentContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ComponentContainerData.DeserializeComponentContainerData(document.RootElement); + value = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ComponentContainerData)null, message.Response); + return Response.FromValue((MachineLearningComponentContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, ComponentContainerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningComponentContainerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -327,7 +327,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, ComponentContainerData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -342,9 +342,9 @@ public async Task> CreateOrUpdateAsync(string s case 200: case 201: { - ComponentContainerData value = default; + MachineLearningComponentContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ComponentContainerData.DeserializeComponentContainerData(document.RootElement); + value = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -361,7 +361,7 @@ public async Task> CreateOrUpdateAsync(string s /// 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 name, ComponentContainerData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningComponentContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -376,9 +376,9 @@ public Response CreateOrUpdate(string subscriptionId, st case 200: case 201: { - ComponentContainerData value = default; + MachineLearningComponentContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ComponentContainerData.DeserializeComponentContainerData(document.RootElement); + value = MachineLearningComponentContainerData.DeserializeMachineLearningComponentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -386,7 +386,7 @@ public Response CreateOrUpdate(string subscriptionId, st } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -410,7 +410,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -443,7 +443,7 @@ public async Task> ListNe /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 1598b252b4cd..7067ec8a3d35 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComponentVersionsRestOperations.cs @@ -37,7 +37,7 @@ public ComponentVersionsRestOperations(HttpPipeline pipeline, string application _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -88,7 +88,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -123,7 +123,7 @@ public async Task> ListAsyn /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -261,7 +261,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, string version, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -275,13 +275,13 @@ public async Task> GetAsync(string subscriptionId { case 200: { - ComponentVersionData value = default; + MachineLearningComponentVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ComponentVersionData.DeserializeComponentVersionData(document.RootElement); + value = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ComponentVersionData)null, message.Response); + return Response.FromValue((MachineLearningComponentVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -296,7 +296,7 @@ public async Task> GetAsync(string subscriptionId /// 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 name, string version, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -310,19 +310,19 @@ public Response Get(string subscriptionId, string resource { case 200: { - ComponentVersionData value = default; + MachineLearningComponentVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ComponentVersionData.DeserializeComponentVersionData(document.RootElement); + value = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ComponentVersionData)null, message.Response); + return Response.FromValue((MachineLearningComponentVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, ComponentVersionData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningComponentVersionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -360,7 +360,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, string version, ComponentVersionData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -376,9 +376,9 @@ public async Task> CreateOrUpdateAsync(string sub case 200: case 201: { - ComponentVersionData value = default; + MachineLearningComponentVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ComponentVersionData.DeserializeComponentVersionData(document.RootElement); + value = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -396,7 +396,7 @@ public async Task> CreateOrUpdateAsync(string sub /// 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 name, string version, ComponentVersionData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningComponentVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -412,9 +412,9 @@ public Response CreateOrUpdate(string subscriptionId, stri case 200: case 201: { - ComponentVersionData value = default; + MachineLearningComponentVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ComponentVersionData.DeserializeComponentVersionData(document.RootElement); + value = MachineLearningComponentVersionData.DeserializeMachineLearningComponentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -422,7 +422,7 @@ public Response CreateOrUpdate(string subscriptionId, stri } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -449,7 +449,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -486,7 +486,7 @@ public async Task> ListNext /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 1fd5741ee9a5..ef06616a6283 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ComputeRestOperations.cs @@ -376,7 +376,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, UnderlyingResourceAction underlyingResourceAction) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, MachineLearningUnderlyingResourceAction underlyingResourceAction) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -408,7 +408,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// 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 computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, MachineLearningUnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -437,7 +437,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// 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 computeName, UnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, MachineLearningUnderlyingResourceAction underlyingResourceAction, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -573,7 +573,7 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc /// 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 computeName, CancellationToken cancellationToken = default) + public async Task> ListKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -586,9 +586,9 @@ public async Task> ListKeysAsync(string subscriptionId, { case 200: { - ComputeSecrets value = default; + MachineLearningComputeSecrets value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ComputeSecrets.DeserializeComputeSecrets(document.RootElement); + value = MachineLearningComputeSecrets.DeserializeMachineLearningComputeSecrets(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -604,7 +604,7 @@ public async Task> ListKeysAsync(string subscriptionId, /// 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 computeName, CancellationToken cancellationToken = default) + public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, string computeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -617,9 +617,9 @@ public Response ListKeys(string subscriptionId, string resourceG { case 200: { - ComputeSecrets value = default; + MachineLearningComputeSecrets value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ComputeSecrets.DeserializeComputeSecrets(document.RootElement); + value = MachineLearningComputeSecrets.DeserializeMachineLearningComputeSecrets(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 7a9d164f9a76..eb950c3864b6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataContainersRestOperations.cs @@ -37,7 +37,7 @@ public DataContainersRestOperations(HttpPipeline pipeline, string applicationId, _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -75,7 +75,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,7 +106,7 @@ public async Task> ListAsync(s /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -234,7 +234,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -247,13 +247,13 @@ public async Task> GetAsync(string subscriptionId, s { case 200: { - DataContainerData value = default; + MachineLearningDataContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataContainerData.DeserializeDataContainerData(document.RootElement); + value = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DataContainerData)null, message.Response); + return Response.FromValue((MachineLearningDataContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -267,7 +267,7 @@ public async Task> GetAsync(string subscriptionId, s /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,19 +280,19 @@ public Response Get(string subscriptionId, string resourceGro { case 200: { - DataContainerData value = default; + MachineLearningDataContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataContainerData.DeserializeDataContainerData(document.RootElement); + value = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DataContainerData)null, message.Response); + return Response.FromValue((MachineLearningDataContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, DataContainerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningDataContainerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -327,7 +327,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, DataContainerData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -342,9 +342,9 @@ public async Task> CreateOrUpdateAsync(string subscr case 200: case 201: { - DataContainerData value = default; + MachineLearningDataContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataContainerData.DeserializeDataContainerData(document.RootElement); + value = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -361,7 +361,7 @@ public async Task> CreateOrUpdateAsync(string subscr /// 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 name, DataContainerData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningDataContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -376,9 +376,9 @@ public Response CreateOrUpdate(string subscriptionId, string case 200: case 201: { - DataContainerData value = default; + MachineLearningDataContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataContainerData.DeserializeDataContainerData(document.RootElement); + value = MachineLearningDataContainerData.DeserializeMachineLearningDataContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -386,7 +386,7 @@ public Response CreateOrUpdate(string subscriptionId, string } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -410,7 +410,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -443,7 +443,7 @@ public async Task> ListNextPag /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 c7bb8624712a..9da2a8d965aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DataVersionsRestOperations.cs @@ -37,7 +37,7 @@ public DataVersionsRestOperations(HttpPipeline pipeline, string applicationId, U _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -96,7 +96,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 name, string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -135,7 +135,7 @@ public async Task> ListAsync /// 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 name, string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -273,7 +273,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, string version, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -287,13 +287,13 @@ public async Task> GetAsync(string subscriptionId, str { case 200: { - DataVersionData value = default; + MachineLearningDataVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionData.DeserializeDataVersionData(document.RootElement); + value = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DataVersionData)null, message.Response); + return Response.FromValue((MachineLearningDataVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -308,7 +308,7 @@ public async Task> GetAsync(string subscriptionId, str /// 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 name, string version, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -322,19 +322,19 @@ public Response Get(string subscriptionId, string resourceGroup { case 200: { - DataVersionData value = default; + MachineLearningDataVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionData.DeserializeDataVersionData(document.RootElement); + value = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DataVersionData)null, message.Response); + return Response.FromValue((MachineLearningDataVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, DataVersionData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningDataVersionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -372,7 +372,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, string version, DataVersionData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -388,9 +388,9 @@ public async Task> CreateOrUpdateAsync(string subscrip case 200: case 201: { - DataVersionData value = default; + MachineLearningDataVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DataVersionData.DeserializeDataVersionData(document.RootElement); + value = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -408,7 +408,7 @@ public async Task> CreateOrUpdateAsync(string subscrip /// 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 name, string version, DataVersionData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningDataVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -424,9 +424,9 @@ public Response CreateOrUpdate(string subscriptionId, string re case 200: case 201: { - DataVersionData value = default; + MachineLearningDataVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DataVersionData.DeserializeDataVersionData(document.RootElement); + value = MachineLearningDataVersionData.DeserializeMachineLearningDataVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -434,7 +434,7 @@ public Response CreateOrUpdate(string subscriptionId, string re } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, string tags, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -465,7 +465,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 name, string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -506,7 +506,7 @@ public async Task> ListNextP /// 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 name, string orderBy = null, int? top = null, string skip = null, string tags = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, string tags = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 114838457f0c..eef28b770d63 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/DatastoresRestOperations.cs @@ -265,7 +265,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -278,13 +278,13 @@ public async Task> GetAsync(string subscriptionId, strin { case 200: { - DatastoreData value = default; + MachineLearningDatastoreData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastoreData.DeserializeDatastoreData(document.RootElement); + value = MachineLearningDatastoreData.DeserializeMachineLearningDatastoreData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatastoreData)null, message.Response); + return Response.FromValue((MachineLearningDatastoreData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -298,7 +298,7 @@ public async Task> GetAsync(string subscriptionId, strin /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -311,19 +311,19 @@ public Response Get(string subscriptionId, string resourceGroupNa { case 200: { - DatastoreData value = default; + MachineLearningDatastoreData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastoreData.DeserializeDatastoreData(document.RootElement); + value = MachineLearningDatastoreData.DeserializeMachineLearningDatastoreData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((DatastoreData)null, message.Response); + return Response.FromValue((MachineLearningDatastoreData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, DatastoreData data, bool? skipValidation) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningDatastoreData data, bool? skipValidation) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -363,7 +363,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, DatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningDatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -378,9 +378,9 @@ public async Task> CreateOrUpdateAsync(string subscripti case 200: case 201: { - DatastoreData value = default; + MachineLearningDatastoreData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastoreData.DeserializeDatastoreData(document.RootElement); + value = MachineLearningDatastoreData.DeserializeMachineLearningDatastoreData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -398,7 +398,7 @@ public async Task> CreateOrUpdateAsync(string subscripti /// 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 name, DatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningDatastoreData data, bool? skipValidation = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -413,9 +413,9 @@ public Response CreateOrUpdate(string subscriptionId, string reso case 200: case 201: { - DatastoreData value = default; + MachineLearningDatastoreData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastoreData.DeserializeDatastoreData(document.RootElement); + value = MachineLearningDatastoreData.DeserializeMachineLearningDatastoreData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -454,7 +454,7 @@ internal HttpMessage CreateListSecretsRequest(string subscriptionId, string reso /// 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, 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)); @@ -467,9 +467,9 @@ public async Task> ListSecretsAsync(string subscripti { case 200: { - DatastoreSecrets value = default; + MachineLearningDatastoreSecrets value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DatastoreSecrets.DeserializeDatastoreSecrets(document.RootElement); + value = MachineLearningDatastoreSecrets.DeserializeMachineLearningDatastoreSecrets(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -485,7 +485,7 @@ public async Task> ListSecretsAsync(string subscripti /// 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, 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)); @@ -498,9 +498,9 @@ public Response ListSecrets(string subscriptionId, string reso { case 200: { - DatastoreSecrets value = default; + MachineLearningDatastoreSecrets value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DatastoreSecrets.DeserializeDatastoreSecrets(document.RootElement); + value = MachineLearningDatastoreSecrets.DeserializeMachineLearningDatastoreSecrets(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 03d7c18f64e0..572c7e9711db 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentContainersRestOperations.cs @@ -37,7 +37,7 @@ public EnvironmentContainersRestOperations(HttpPipeline pipeline, string applica _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -75,7 +75,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,7 +106,7 @@ public async Task> List /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -234,7 +234,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -247,13 +247,13 @@ public async Task> GetAsync(string subscripti { case 200: { - EnvironmentContainerData value = default; + MachineLearningEnvironmentContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentContainerData.DeserializeEnvironmentContainerData(document.RootElement); + value = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EnvironmentContainerData)null, message.Response); + return Response.FromValue((MachineLearningEnvironmentContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -267,7 +267,7 @@ public async Task> GetAsync(string subscripti /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -280,19 +280,19 @@ public Response Get(string subscriptionId, string reso { case 200: { - EnvironmentContainerData value = default; + MachineLearningEnvironmentContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentContainerData.DeserializeEnvironmentContainerData(document.RootElement); + value = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EnvironmentContainerData)null, message.Response); + return Response.FromValue((MachineLearningEnvironmentContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, EnvironmentContainerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningEnvironmentContainerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -327,7 +327,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, EnvironmentContainerData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -342,9 +342,9 @@ public async Task> CreateOrUpdateAsync(string case 200: case 201: { - EnvironmentContainerData value = default; + MachineLearningEnvironmentContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentContainerData.DeserializeEnvironmentContainerData(document.RootElement); + value = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -361,7 +361,7 @@ public async Task> CreateOrUpdateAsync(string /// 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 name, EnvironmentContainerData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningEnvironmentContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -376,9 +376,9 @@ public Response CreateOrUpdate(string subscriptionId, case 200: case 201: { - EnvironmentContainerData value = default; + MachineLearningEnvironmentContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentContainerData.DeserializeEnvironmentContainerData(document.RootElement); + value = MachineLearningEnvironmentContainerData.DeserializeMachineLearningEnvironmentContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -386,7 +386,7 @@ public Response CreateOrUpdate(string subscriptionId, } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -410,7 +410,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -443,7 +443,7 @@ public async Task> List /// 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 skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 9ec350787653..10de117d5530 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/EnvironmentVersionsRestOperations.cs @@ -37,7 +37,7 @@ public EnvironmentVersionsRestOperations(HttpPipeline pipeline, string applicati _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -88,7 +88,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -123,7 +123,7 @@ public async Task> ListAs /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -261,7 +261,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, string version, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -275,13 +275,13 @@ public async Task> GetAsync(string subscription { case 200: { - EnvironmentVersionData value = default; + MachineLearningEnvironmentVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentVersionData.DeserializeEnvironmentVersionData(document.RootElement); + value = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EnvironmentVersionData)null, message.Response); + return Response.FromValue((MachineLearningEnvironmentVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -296,7 +296,7 @@ public async Task> GetAsync(string subscription /// 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 name, string version, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -310,19 +310,19 @@ public Response Get(string subscriptionId, string resour { case 200: { - EnvironmentVersionData value = default; + MachineLearningEnvironmentVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentVersionData.DeserializeEnvironmentVersionData(document.RootElement); + value = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((EnvironmentVersionData)null, message.Response); + return Response.FromValue((MachineLearningEnvironmentVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, EnvironmentVersionData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningEnvironmentVersionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -360,7 +360,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, string version, EnvironmentVersionData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -376,9 +376,9 @@ public async Task> CreateOrUpdateAsync(string s case 200: case 201: { - EnvironmentVersionData value = default; + MachineLearningEnvironmentVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EnvironmentVersionData.DeserializeEnvironmentVersionData(document.RootElement); + value = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -396,7 +396,7 @@ public async Task> CreateOrUpdateAsync(string s /// 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 name, string version, EnvironmentVersionData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningEnvironmentVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -412,9 +412,9 @@ public Response CreateOrUpdate(string subscriptionId, st case 200: case 201: { - EnvironmentVersionData value = default; + MachineLearningEnvironmentVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EnvironmentVersionData.DeserializeEnvironmentVersionData(document.RootElement); + value = MachineLearningEnvironmentVersionData.DeserializeMachineLearningEnvironmentVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -422,7 +422,7 @@ public Response CreateOrUpdate(string subscriptionId, st } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy, int? top, string skip, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -449,7 +449,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -486,7 +486,7 @@ public async Task> ListNe /// 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 name, string orderBy = null, int? top = null, string skip = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string orderBy = null, int? top = null, string skip = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 c27d808ac9fe..825dac026f1f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/JobsRestOperations.cs @@ -37,7 +37,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -85,7 +85,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 skip = null, string jobType = null, string tag = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -118,7 +118,7 @@ public async Task> ListAsync(string /// 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 skip = null, string jobType = null, string tag = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -477,7 +477,7 @@ public Response Cancel(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, string jobType, string tag, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -503,7 +503,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 skip = null, string jobType = null, string tag = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -538,7 +538,7 @@ public async Task> ListNextPageAsync /// 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 skip = null, string jobType = null, string tag = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, string jobType = null, string tag = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 ff81c3a3ddd3..70fc667300dc 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelContainersRestOperations.cs @@ -37,7 +37,7 @@ public ModelContainersRestOperations(HttpPipeline pipeline, string applicationId _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, int? count, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, int? count, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -80,7 +80,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 skip = null, int? count = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? count = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -112,7 +112,7 @@ public async Task> ListAsync( /// 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 skip = null, int? count = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? count = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -240,7 +240,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -253,13 +253,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - ModelContainerData value = default; + MachineLearningModelContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelContainerData.DeserializeModelContainerData(document.RootElement); + value = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ModelContainerData)null, message.Response); + return Response.FromValue((MachineLearningModelContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -273,7 +273,7 @@ public async Task> GetAsync(string subscriptionId, /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -286,19 +286,19 @@ public Response Get(string subscriptionId, string resourceGr { case 200: { - ModelContainerData value = default; + MachineLearningModelContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelContainerData.DeserializeModelContainerData(document.RootElement); + value = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ModelContainerData)null, message.Response); + return Response.FromValue((MachineLearningModelContainerData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, ModelContainerData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningModelContainerData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -333,7 +333,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, ModelContainerData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -348,9 +348,9 @@ public async Task> CreateOrUpdateAsync(string subsc case 200: case 201: { - ModelContainerData value = default; + MachineLearningModelContainerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelContainerData.DeserializeModelContainerData(document.RootElement); + value = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -367,7 +367,7 @@ public async Task> CreateOrUpdateAsync(string subsc /// 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 name, ModelContainerData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningModelContainerData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -382,9 +382,9 @@ public Response CreateOrUpdate(string subscriptionId, string case 200: case 201: { - ModelContainerData value = default; + MachineLearningModelContainerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelContainerData.DeserializeModelContainerData(document.RootElement); + value = MachineLearningModelContainerData.DeserializeMachineLearningModelContainerData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -392,7 +392,7 @@ public Response CreateOrUpdate(string subscriptionId, string } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, int? count, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, int? count, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -417,7 +417,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 skip = null, int? count = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? count = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -451,7 +451,7 @@ public async Task> ListNextPa /// 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 skip = null, int? count = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, int? count = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 76bd2b9bd186..f564cba2f564 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/ModelVersionsRestOperations.cs @@ -37,7 +37,7 @@ public ModelVersionsRestOperations(HttpPipeline pipeline, string applicationId, _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, ListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -118,7 +118,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -159,7 +159,7 @@ public async Task> ListAsync(st /// 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 name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -297,7 +297,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, string version, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -311,13 +311,13 @@ public async Task> GetAsync(string subscriptionId, st { case 200: { - ModelVersionData value = default; + MachineLearningModelVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelVersionData.DeserializeModelVersionData(document.RootElement); + value = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ModelVersionData)null, message.Response); + return Response.FromValue((MachineLearningModelVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -332,7 +332,7 @@ public async Task> GetAsync(string subscriptionId, st /// 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 name, string version, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -346,19 +346,19 @@ public Response Get(string subscriptionId, string resourceGrou { case 200: { - ModelVersionData value = default; + MachineLearningModelVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelVersionData.DeserializeModelVersionData(document.RootElement); + value = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ModelVersionData)null, message.Response); + return Response.FromValue((MachineLearningModelVersionData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, ModelVersionData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningModelVersionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -396,7 +396,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, string version, ModelVersionData data, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -412,9 +412,9 @@ public async Task> CreateOrUpdateAsync(string subscri case 200: case 201: { - ModelVersionData value = default; + MachineLearningModelVersionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ModelVersionData.DeserializeModelVersionData(document.RootElement); + value = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -432,7 +432,7 @@ public async Task> CreateOrUpdateAsync(string subscri /// 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 name, string version, ModelVersionData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, string version, MachineLearningModelVersionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -448,9 +448,9 @@ public Response CreateOrUpdate(string subscriptionId, string r case 200: case 201: { - ModelVersionData value = default; + MachineLearningModelVersionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ModelVersionData.DeserializeModelVersionData(document.RootElement); + value = MachineLearningModelVersionData.DeserializeMachineLearningModelVersionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -458,7 +458,7 @@ public Response CreateOrUpdate(string subscriptionId, string r } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, ListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip, string orderBy, int? top, string version, string description, int? offset, string tags, string properties, string feed, MachineLearningListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -491,7 +491,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -534,7 +534,7 @@ public async Task> ListNextPage /// 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 name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, ListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, string skip = null, string orderBy = null, int? top = null, string version = null, string description = null, int? offset = null, string tags = null, string properties = null, string feed = null, MachineLearningListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 ab70d1b0ca41..9cb09f963161 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineDeploymentsRestOperations.cs @@ -257,7 +257,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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) + 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)); @@ -271,13 +271,13 @@ public async Task> GetAsync(string subscriptionId { case 200: { - OnlineDeploymentData value = default; + MachineLearningOnlineDeploymentData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OnlineDeploymentData.DeserializeOnlineDeploymentData(document.RootElement); + value = MachineLearningOnlineDeploymentData.DeserializeMachineLearningOnlineDeploymentData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((OnlineDeploymentData)null, message.Response); + return Response.FromValue((MachineLearningOnlineDeploymentData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -292,7 +292,7 @@ public async Task> GetAsync(string subscriptionId /// 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) + 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)); @@ -306,19 +306,19 @@ public Response Get(string subscriptionId, string resource { case 200: { - OnlineDeploymentData value = default; + MachineLearningOnlineDeploymentData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OnlineDeploymentData.DeserializeOnlineDeploymentData(document.RootElement); + value = MachineLearningOnlineDeploymentData.DeserializeMachineLearningOnlineDeploymentData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((OnlineDeploymentData)null, message.Response); + return Response.FromValue((MachineLearningOnlineDeploymentData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, OnlineDeploymentPatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningOnlineDeploymentPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -356,7 +356,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , , 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 endpointName, string deploymentName, OnlineDeploymentPatch patch, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningOnlineDeploymentPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -387,7 +387,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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, string endpointName, string deploymentName, OnlineDeploymentPatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningOnlineDeploymentPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -408,7 +408,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, OnlineDeploymentData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningOnlineDeploymentData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -446,7 +446,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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, OnlineDeploymentData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningOnlineDeploymentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -477,7 +477,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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, OnlineDeploymentData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningOnlineDeploymentData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -498,7 +498,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateGetLogsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, DeploymentLogsContent content) + internal HttpMessage CreateGetLogsRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningDeploymentLogsContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -537,7 +537,7 @@ internal HttpMessage CreateGetLogsRequest(string subscriptionId, string resource /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public async Task> GetLogsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, DeploymentLogsContent content, CancellationToken cancellationToken = default) + public async Task> GetLogsAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningDeploymentLogsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -552,9 +552,9 @@ public async Task> GetLogsAsync(string subscriptionId, { case 200: { - DeploymentLogs value = default; + MachineLearningDeploymentLogs value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = DeploymentLogs.DeserializeDeploymentLogs(document.RootElement); + value = MachineLearningDeploymentLogs.DeserializeMachineLearningDeploymentLogs(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -572,7 +572,7 @@ public async Task> GetLogsAsync(string subscriptionId, /// The cancellation token to use. /// , , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. - public Response GetLogs(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, DeploymentLogsContent content, CancellationToken cancellationToken = default) + public Response GetLogs(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, string deploymentName, MachineLearningDeploymentLogsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -587,9 +587,9 @@ public Response GetLogs(string subscriptionId, string resourceGr { case 200: { - DeploymentLogs value = default; + MachineLearningDeploymentLogs value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = DeploymentLogs.DeserializeDeploymentLogs(document.RootElement); + value = MachineLearningDeploymentLogs.DeserializeMachineLearningDeploymentLogs(document.RootElement); return Response.FromValue(value, message.Response); } default: 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 b38faa3512ae..4f1b90cb4833 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/OnlineEndpointsRestOperations.cs @@ -37,7 +37,7 @@ public OnlineEndpointsRestOperations(HttpPipeline pipeline, string applicationId _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, int? count, EndpointComputeType? computeType, string skip, string tags, string properties, OrderString? orderBy) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, int? count, MachineLearningEndpointComputeType? computeType, string skip, string tags, string properties, MachineLearningOrderString? orderBy) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -100,7 +100,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 name = null, int? count = null, EndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, OrderString? orderBy = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name = null, int? count = null, MachineLearningEndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, MachineLearningOrderString? orderBy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -136,7 +136,7 @@ public async Task> Lis /// 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 name = null, int? count = null, EndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, OrderString? orderBy = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string name = null, int? count = null, MachineLearningEndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, MachineLearningOrderString? orderBy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -266,7 +266,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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) + 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)); @@ -279,13 +279,13 @@ public async Task> GetAsync(string subscriptionId, { case 200: { - OnlineEndpointData value = default; + MachineLearningOnlineEndpointData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = OnlineEndpointData.DeserializeOnlineEndpointData(document.RootElement); + value = MachineLearningOnlineEndpointData.DeserializeMachineLearningOnlineEndpointData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((OnlineEndpointData)null, message.Response); + return Response.FromValue((MachineLearningOnlineEndpointData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -299,7 +299,7 @@ public async Task> GetAsync(string subscriptionId, /// 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) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -312,19 +312,19 @@ public Response Get(string subscriptionId, string resourceGr { case 200: { - OnlineEndpointData value = default; + MachineLearningOnlineEndpointData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = OnlineEndpointData.DeserializeOnlineEndpointData(document.RootElement); + value = MachineLearningOnlineEndpointData.DeserializeMachineLearningOnlineEndpointData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((OnlineEndpointData)null, message.Response); + return Response.FromValue((MachineLearningOnlineEndpointData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, PartialMinimalTrackedResourceWithIdentity body) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningResourcePatchWithIdentity body) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -359,7 +359,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// The cancellation token to use. /// , , , 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 endpointName, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -388,7 +388,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// 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, string endpointName, PartialMinimalTrackedResourceWithIdentity body, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningResourcePatchWithIdentity body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -408,7 +408,7 @@ public Response Update(string subscriptionId, string resourceGroupName, string w } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, OnlineEndpointData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningOnlineEndpointData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -443,7 +443,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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, OnlineEndpointData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningOnlineEndpointData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -472,7 +472,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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, OnlineEndpointData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningOnlineEndpointData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -523,7 +523,7 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc /// 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) + 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)); @@ -536,9 +536,9 @@ public async Task> ListKeysAsync(string subscriptionI { case 200: { - EndpointAuthKeys value = default; + MachineLearningEndpointAuthKeys value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointAuthKeys.DeserializeEndpointAuthKeys(document.RootElement); + value = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -554,7 +554,7 @@ public async Task> ListKeysAsync(string subscriptionI /// 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) + public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -567,9 +567,9 @@ public Response ListKeys(string subscriptionId, string resourc { case 200: { - EndpointAuthKeys value = default; + MachineLearningEndpointAuthKeys value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointAuthKeys.DeserializeEndpointAuthKeys(document.RootElement); + value = MachineLearningEndpointAuthKeys.DeserializeMachineLearningEndpointAuthKeys(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -577,7 +577,7 @@ public Response ListKeys(string subscriptionId, string resourc } } - internal HttpMessage CreateRegenerateKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, RegenerateEndpointKeysContent content) + internal HttpMessage CreateRegenerateKeysRequest(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningEndpointKeyRegenerateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -613,7 +613,7 @@ internal HttpMessage CreateRegenerateKeysRequest(string subscriptionId, string r /// 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, RegenerateEndpointKeysContent content, CancellationToken cancellationToken = default) + public async Task RegenerateKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningEndpointKeyRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -642,7 +642,7 @@ public async Task RegenerateKeysAsync(string subscriptionId, string re /// 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, RegenerateEndpointKeysContent content, CancellationToken cancellationToken = default) + public Response RegenerateKeys(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, MachineLearningEndpointKeyRegenerateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -693,7 +693,7 @@ internal HttpMessage CreateGetTokenRequest(string subscriptionId, string resourc /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetTokenAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) + public async Task> GetTokenAsync(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -706,9 +706,9 @@ public async Task> GetTokenAsync(string subscription { case 200: { - EndpointAuthToken value = default; + MachineLearningEndpointAuthToken value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = EndpointAuthToken.DeserializeEndpointAuthToken(document.RootElement); + value = MachineLearningEndpointAuthToken.DeserializeMachineLearningEndpointAuthToken(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -724,7 +724,7 @@ public async Task> GetTokenAsync(string subscription /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetToken(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) + public Response GetToken(string subscriptionId, string resourceGroupName, string workspaceName, string endpointName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -737,9 +737,9 @@ public Response GetToken(string subscriptionId, string resour { case 200: { - EndpointAuthToken value = default; + MachineLearningEndpointAuthToken value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = EndpointAuthToken.DeserializeEndpointAuthToken(document.RootElement); + value = MachineLearningEndpointAuthToken.DeserializeMachineLearningEndpointAuthToken(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -747,7 +747,7 @@ public Response GetToken(string subscriptionId, string resour } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, int? count, EndpointComputeType? computeType, string skip, string tags, string properties, OrderString? orderBy) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name, int? count, MachineLearningEndpointComputeType? computeType, string skip, string tags, string properties, MachineLearningOrderString? orderBy) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -776,7 +776,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 name = null, int? count = null, EndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, OrderString? orderBy = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name = null, int? count = null, MachineLearningEndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, MachineLearningOrderString? orderBy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -814,7 +814,7 @@ public async Task> Lis /// 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 name = null, int? count = null, EndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, OrderString? orderBy = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string name = null, int? count = null, MachineLearningEndpointComputeType? computeType = null, string skip = null, string tags = null, string properties = null, MachineLearningOrderString? orderBy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 cbc3529259ec..7ac1a77e6a72 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/QuotasRestOperations.cs @@ -37,7 +37,7 @@ public QuotasRestOperations(HttpPipeline pipeline, string applicationId, Uri end _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateUpdateRequest(string subscriptionId, AzureLocation location, QuotaUpdateContent content) + internal HttpMessage CreateUpdateRequest(string subscriptionId, AzureLocation location, MachineLearningQuotaUpdateContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -67,7 +67,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, AzureLocation lo /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, AzureLocation location, QuotaUpdateContent content, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, AzureLocation location, MachineLearningQuotaUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); @@ -95,7 +95,7 @@ public async Task> UpdateAsync(string subs /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, AzureLocation location, QuotaUpdateContent content, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, AzureLocation location, MachineLearningQuotaUpdateContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(content, nameof(content)); 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 0f28b58f1642..87a7f92ac68e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/SchedulesRestOperations.cs @@ -37,7 +37,7 @@ public SchedulesRestOperations(HttpPipeline pipeline, string applicationId, Uri _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, ScheduleListViewType? listViewType) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningScheduleListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -75,7 +75,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro /// 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 skip = null, ScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -106,7 +106,7 @@ public async Task> ListAsync(string /// 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 skip = null, ScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response List(string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -236,7 +236,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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 name, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -249,13 +249,13 @@ public async Task> GetAsync(string subscriptionId, string { case 200: { - ScheduleData value = default; + MachineLearningScheduleData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ScheduleData.DeserializeScheduleData(document.RootElement); + value = MachineLearningScheduleData.DeserializeMachineLearningScheduleData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ScheduleData)null, message.Response); + return Response.FromValue((MachineLearningScheduleData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -269,7 +269,7 @@ public async Task> GetAsync(string subscriptionId, string /// 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 name, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string name, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -282,19 +282,19 @@ public Response Get(string subscriptionId, string resourceGroupNam { case 200: { - ScheduleData value = default; + MachineLearningScheduleData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ScheduleData.DeserializeScheduleData(document.RootElement); + value = MachineLearningScheduleData.DeserializeMachineLearningScheduleData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((ScheduleData)null, message.Response); + return Response.FromValue((MachineLearningScheduleData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, ScheduleData data) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningScheduleData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -329,7 +329,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// 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 name, ScheduleData data, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningScheduleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -358,7 +358,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// 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 name, ScheduleData data, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string workspaceName, string name, MachineLearningScheduleData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -378,7 +378,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, ScheduleListViewType? listViewType) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip, MachineLearningScheduleListViewType? listViewType) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -402,7 +402,7 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// 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 skip = null, ScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -435,7 +435,7 @@ public async Task> ListNextPageAsyn /// 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 skip = null, ScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string workspaceName, string skip = null, MachineLearningScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); 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 3a8e6d196260..277e1192912f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspaceConnectionsRestOperations.cs @@ -37,7 +37,7 @@ public WorkspaceConnectionsRestOperations(HttpPipeline pipeline, string applicat _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, WorkspaceConnectionPropertiesV2BasicResourceData data) + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, MachineLearningWorkspaceConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -71,7 +71,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// 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, WorkspaceConnectionPropertiesV2BasicResourceData data, 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)); @@ -85,9 +85,9 @@ public async Task> Cr { case 200: { - WorkspaceConnectionPropertiesV2BasicResourceData value = default; + MachineLearningWorkspaceConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceConnectionPropertiesV2BasicResourceData.DeserializeWorkspaceConnectionPropertiesV2BasicResourceData(document.RootElement); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -103,7 +103,7 @@ public async Task> Cr /// 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, WorkspaceConnectionPropertiesV2BasicResourceData data, 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)); @@ -117,9 +117,9 @@ public Response Create(string { case 200: { - WorkspaceConnectionPropertiesV2BasicResourceData value = default; + MachineLearningWorkspaceConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceConnectionPropertiesV2BasicResourceData.DeserializeWorkspaceConnectionPropertiesV2BasicResourceData(document.RootElement); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -156,7 +156,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// 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, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -169,13 +169,13 @@ public async Task> Ge { case 200: { - WorkspaceConnectionPropertiesV2BasicResourceData value = default; + MachineLearningWorkspaceConnectionData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = WorkspaceConnectionPropertiesV2BasicResourceData.DeserializeWorkspaceConnectionPropertiesV2BasicResourceData(document.RootElement); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkspaceConnectionPropertiesV2BasicResourceData)null, message.Response); + return Response.FromValue((MachineLearningWorkspaceConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } @@ -188,7 +188,7 @@ public async Task> Ge /// 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, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -201,13 +201,13 @@ public Response Get(string sub { case 200: { - WorkspaceConnectionPropertiesV2BasicResourceData value = default; + MachineLearningWorkspaceConnectionData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = WorkspaceConnectionPropertiesV2BasicResourceData.DeserializeWorkspaceConnectionPropertiesV2BasicResourceData(document.RootElement); + value = MachineLearningWorkspaceConnectionData.DeserializeMachineLearningWorkspaceConnectionData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((WorkspaceConnectionPropertiesV2BasicResourceData)null, message.Response); + return Response.FromValue((MachineLearningWorkspaceConnectionData)null, message.Response); default: throw new RequestFailedException(message.Response); } 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 a301f94e5b8d..24d772523a6c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/RestOperations/WorkspacesRestOperations.cs @@ -426,7 +426,7 @@ public Response ListByResourceGroup(string subscriptionId, } } - internal HttpMessage CreateDiagnoseRequest(string subscriptionId, string resourceGroupName, string workspaceName, DiagnoseWorkspaceContent content) + internal HttpMessage CreateDiagnoseRequest(string subscriptionId, string resourceGroupName, string workspaceName, MachineLearningWorkspaceDiagnoseContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -462,7 +462,7 @@ internal HttpMessage CreateDiagnoseRequest(string subscriptionId, string resourc /// 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, DiagnoseWorkspaceContent content = null, 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)); @@ -488,7 +488,7 @@ public async Task DiagnoseAsync(string subscriptionId, string resource /// 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, DiagnoseWorkspaceContent content = null, 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)); @@ -534,7 +534,7 @@ internal HttpMessage CreateListKeysRequest(string subscriptionId, string resourc /// 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) + public async Task> ListKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -546,9 +546,9 @@ public async Task> ListKeysAsync(string subscr { case 200: { - ListWorkspaceKeysResult value = default; + MachineLearningWorkspaceGetKeysResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListWorkspaceKeysResult.DeserializeListWorkspaceKeysResult(document.RootElement); + value = MachineLearningWorkspaceGetKeysResult.DeserializeMachineLearningWorkspaceGetKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -563,7 +563,7 @@ public async Task> ListKeysAsync(string subscr /// 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) + public Response ListKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -575,9 +575,9 @@ public Response ListKeys(string subscriptionId, string { case 200: { - ListWorkspaceKeysResult value = default; + MachineLearningWorkspaceGetKeysResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListWorkspaceKeysResult.DeserializeListWorkspaceKeysResult(document.RootElement); + value = MachineLearningWorkspaceGetKeysResult.DeserializeMachineLearningWorkspaceGetKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -757,7 +757,7 @@ internal HttpMessage CreateListNotebookAccessTokenRequest(string subscriptionId, /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListNotebookAccessTokenAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListNotebookAccessTokenAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -769,9 +769,9 @@ public async Task> ListNotebookAccessTokenAs { case 200: { - NotebookAccessTokenResult value = default; + MachineLearningWorkspaceNotebookAccessTokenResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = NotebookAccessTokenResult.DeserializeNotebookAccessTokenResult(document.RootElement); + value = MachineLearningWorkspaceNotebookAccessTokenResult.DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -786,7 +786,7 @@ public async Task> ListNotebookAccessTokenAs /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListNotebookAccessToken(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListNotebookAccessToken(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -798,9 +798,9 @@ public Response ListNotebookAccessToken(string subscr { case 200: { - NotebookAccessTokenResult value = default; + MachineLearningWorkspaceNotebookAccessTokenResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = NotebookAccessTokenResult.DeserializeNotebookAccessTokenResult(document.RootElement); + value = MachineLearningWorkspaceNotebookAccessTokenResult.DeserializeMachineLearningWorkspaceNotebookAccessTokenResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -907,7 +907,7 @@ internal HttpMessage CreateListStorageAccountKeysRequest(string subscriptionId, /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListStorageAccountKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public async Task> ListStorageAccountKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -919,9 +919,9 @@ public async Task> ListStorageAccountKeys { case 200: { - ListStorageAccountKeysResult value = default; + MachineLearningWorkspaceGetStorageAccountKeysResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListStorageAccountKeysResult.DeserializeListStorageAccountKeysResult(document.RootElement); + value = MachineLearningWorkspaceGetStorageAccountKeysResult.DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -936,7 +936,7 @@ public async Task> ListStorageAccountKeys /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListStorageAccountKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) + public Response ListStorageAccountKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -948,9 +948,9 @@ public Response ListStorageAccountKeys(string subs { case 200: { - ListStorageAccountKeysResult value = default; + MachineLearningWorkspaceGetStorageAccountKeysResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListStorageAccountKeysResult.DeserializeListStorageAccountKeysResult(document.RootElement); + value = MachineLearningWorkspaceGetStorageAccountKeysResult.DeserializeMachineLearningWorkspaceGetStorageAccountKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -986,7 +986,7 @@ internal HttpMessage CreateListNotebookKeysRequest(string subscriptionId, string /// 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> ListNotebookKeysAsync(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -998,9 +998,9 @@ public async Task> ListNotebookKeysAsync(string { case 200: { - ListNotebookKeysResult value = default; + MachineLearningWorkspaceGetNotebookKeysResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); + value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -1015,7 +1015,7 @@ public async Task> ListNotebookKeysAsync(string /// 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 ListNotebookKeys(string subscriptionId, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -1027,9 +1027,9 @@ public Response ListNotebookKeys(string subscriptionId, { case 200: { - ListNotebookKeysResult value = default; + MachineLearningWorkspaceGetNotebookKeysResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = ListNotebookKeysResult.DeserializeListNotebookKeysResult(document.RootElement); + value = MachineLearningWorkspaceGetNotebookKeysResult.DeserializeMachineLearningWorkspaceGetNotebookKeysResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleCollection.cs deleted file mode 100644 index 3b96ed65a785..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleCollection.cs +++ /dev/null @@ -1,338 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -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 a instance call the GetSchedules method from an instance of . - /// - public partial class ScheduleCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _scheduleClientDiagnostics; - private readonly SchedulesRestOperations _scheduleRestClient; - - /// Initializes a new instance of the class for mocking. - protected ScheduleCollection() - { - } - - /// 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 ScheduleCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _scheduleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ScheduleResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ScheduleResource.ResourceType, out string scheduleApiVersion); - _scheduleRestClient = new SchedulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scheduleApiVersion); -#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 schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_CreateOrUpdate - /// - /// 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. - /// Schedule name. - /// Schedule definition. - /// 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 name, ScheduleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _scheduleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new ScheduleOperationSource(Client), _scheduleClientDiagnostics, Pipeline, _scheduleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, 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 schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_CreateOrUpdate - /// - /// 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. - /// Schedule name. - /// Schedule definition. - /// 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 name, ScheduleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _scheduleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new ScheduleOperationSource(Client), _scheduleClientDiagnostics, Pipeline, _scheduleRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Get - /// - /// Schedule name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.Get"); - scope.Start(); - try - { - var response = await _scheduleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ScheduleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Get - /// - /// Schedule name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.Get"); - scope.Start(); - try - { - var response = _scheduleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ScheduleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// List schedules in specified workspace. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules - /// Operation Id: Schedules_List - /// - /// Continuation token for pagination. - /// Status filter for schedule. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(string skip = null, ScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.GetAll"); - scope.Start(); - try - { - var response = await _scheduleRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.GetAll"); - scope.Start(); - try - { - var response = await _scheduleRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new ScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// List schedules in specified workspace. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules - /// Operation Id: Schedules_List - /// - /// Continuation token for pagination. - /// Status filter for schedule. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(string skip = null, ScheduleListViewType? listViewType = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.GetAll"); - scope.Start(); - try - { - var response = _scheduleRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.GetAll"); - scope.Start(); - try - { - var response = _scheduleRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, listViewType, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new ScheduleResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Get - /// - /// Schedule name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.Exists"); - scope.Start(); - try - { - var response = await _scheduleRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, 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}/schedules/{name} - /// Operation Id: Schedules_Get - /// - /// Schedule name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleCollection.Exists"); - scope.Start(); - try - { - var response = _scheduleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, name, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/ScheduleData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleData.cs deleted file mode 100644 index 39ec307bb1b5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleData.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the Schedule data model. - public partial class ScheduleData : ResourceData - { - /// Initializes a new instance of ScheduleData. - /// [Required] Additional attributes of the entity. - /// is null. - public ScheduleData(ScheduleProperties properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of ScheduleData. - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// [Required] Additional attributes of the entity. - internal ScheduleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ScheduleProperties properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// [Required] Additional attributes of the entity. - public ScheduleProperties Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleResource.cs deleted file mode 100644 index 46aca5717364..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/ScheduleResource.cs +++ /dev/null @@ -1,249 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a Schedule 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 GetScheduleResource method. - /// Otherwise you can get one from its parent resource using the GetSchedule method. - /// - public partial class ScheduleResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string name) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _scheduleClientDiagnostics; - private readonly SchedulesRestOperations _scheduleRestClient; - private readonly ScheduleData _data; - - /// Initializes a new instance of the class for mocking. - protected ScheduleResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal ScheduleResource(ArmClient client, ScheduleData 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 ScheduleResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _scheduleClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string scheduleApiVersion); - _scheduleRestClient = new SchedulesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, scheduleApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/schedules"; - - /// 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 ScheduleData 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 schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleResource.Get"); - scope.Start(); - try - { - var response = await _scheduleRestClient.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 ScheduleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleResource.Get"); - scope.Start(); - try - { - var response = _scheduleRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new ScheduleResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Delete - /// - /// 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 = _scheduleClientDiagnostics.CreateScope("ScheduleResource.Delete"); - scope.Start(); - try - { - var response = await _scheduleRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(_scheduleClientDiagnostics, Pipeline, _scheduleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_Delete - /// - /// 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 = _scheduleClientDiagnostics.CreateScope("ScheduleResource.Delete"); - scope.Start(); - try - { - var response = _scheduleRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(_scheduleClientDiagnostics, Pipeline, _scheduleRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create or update schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_CreateOrUpdate - /// - /// 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. - /// Schedule definition. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, ScheduleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleResource.Update"); - scope.Start(); - try - { - var response = await _scheduleRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(new ScheduleOperationSource(Client), _scheduleClientDiagnostics, Pipeline, _scheduleRestClient.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 schedule. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name} - /// Operation Id: Schedules_CreateOrUpdate - /// - /// 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. - /// Schedule definition. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, ScheduleData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _scheduleClientDiagnostics.CreateScope("ScheduleResource.Update"); - scope.Start(); - try - { - var response = _scheduleRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(new ScheduleOperationSource(Client), _scheduleClientDiagnostics, Pipeline, _scheduleRestClient.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; - } - } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResource.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResource.cs deleted file mode 100644 index 1e7980207be1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResource.cs +++ /dev/null @@ -1,243 +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; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.MachineLearning -{ - /// - /// A Class representing a WorkspaceConnectionPropertiesV2BasicResource 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 GetWorkspaceConnectionPropertiesV2BasicResource method. - /// Otherwise you can get one from its parent resource using the GetWorkspaceConnectionPropertiesV2BasicResource method. - /// - public partial class WorkspaceConnectionPropertiesV2BasicResource : ArmResource - { - /// Generate the resource identifier of a instance. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string workspaceName, string connectionName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics; - private readonly WorkspaceConnectionsRestOperations _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient; - private readonly WorkspaceConnectionPropertiesV2BasicResourceData _data; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceConnectionPropertiesV2BasicResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal WorkspaceConnectionPropertiesV2BasicResource(ArmClient client, WorkspaceConnectionPropertiesV2BasicResourceData 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 WorkspaceConnectionPropertiesV2BasicResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsApiVersion); - _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient = new WorkspaceConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.MachineLearningServices/workspaces/connections"; - - /// 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 WorkspaceConnectionPropertiesV2BasicResourceData 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)); - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Get - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResource.Get"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.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 WorkspaceConnectionPropertiesV2BasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Get - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResource.Get"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Delete - /// - /// 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 = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResource.Delete"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Delete - /// - /// 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 = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResource.Delete"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new MachineLearningArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_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. - /// The object for creating or updating a new workspace connection. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, WorkspaceConnectionPropertiesV2BasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResource.Update"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_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. - /// The object for creating or updating a new workspace connection. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, WorkspaceConnectionPropertiesV2BasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResource.Update"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response), response.GetRawResponse())); - 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/WorkspaceConnectionPropertiesV2BasicResourceCollection.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResourceCollection.cs deleted file mode 100644 index 01b466cc79f1..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResourceCollection.cs +++ /dev/null @@ -1,331 +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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; - -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 GetWorkspaceConnectionPropertiesV2BasicResources method from an instance of . - /// - public partial class WorkspaceConnectionPropertiesV2BasicResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable - { - private readonly ClientDiagnostics _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics; - private readonly WorkspaceConnectionsRestOperations _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient; - - /// Initializes a new instance of the class for mocking. - protected WorkspaceConnectionPropertiesV2BasicResourceCollection() - { - } - - /// 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 WorkspaceConnectionPropertiesV2BasicResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MachineLearning", WorkspaceConnectionPropertiesV2BasicResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WorkspaceConnectionPropertiesV2BasicResource.ResourceType, out string workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsApiVersion); - _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient = new WorkspaceConnectionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsApiVersion); -#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)); - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_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. - /// Friendly name of the workspace connection. - /// The object for creating or updating a new workspace connection. - /// 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 connectionName, WorkspaceConnectionPropertiesV2BasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, data, cancellationToken).ConfigureAwait(false); - var operation = new MachineLearningArmOperation(Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_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. - /// Friendly name of the workspace connection. - /// The object for creating or updating a new workspace connection. - /// 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 connectionName, WorkspaceConnectionPropertiesV2BasicResourceData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, data, cancellationToken); - var operation = new MachineLearningArmOperation(Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Get - /// - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.Get"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Get - /// - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.Get"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new WorkspaceConnectionPropertiesV2BasicResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections - /// Operation Id: WorkspaceConnections_List - /// - /// 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 = null, string category = null, CancellationToken cancellationToken = default) - { - async Task> FirstPageFunc(int? pageSizeHint) - { - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.GetAll"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new WorkspaceConnectionPropertiesV2BasicResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.GetAll"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new WorkspaceConnectionPropertiesV2BasicResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections - /// Operation Id: WorkspaceConnections_List - /// - /// 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 = null, string category = null, CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) - { - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.GetAll"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new WorkspaceConnectionPropertiesV2BasicResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - Page NextPageFunc(string nextLink, int? pageSizeHint) - { - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.GetAll"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, target, category, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new WorkspaceConnectionPropertiesV2BasicResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); - } - - /// - /// Checks to see if the resource exists in azure. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName} - /// Operation Id: WorkspaceConnections_Get - /// - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = await _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, 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} - /// Operation Id: WorkspaceConnections_Get - /// - /// Friendly name of the workspace connection. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var scope = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsClientDiagnostics.CreateScope("WorkspaceConnectionPropertiesV2BasicResourceCollection.Exists"); - scope.Start(); - try - { - var response = _workspaceConnectionPropertiesV2BasicResourceWorkspaceConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, connectionName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, 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/WorkspaceConnectionPropertiesV2BasicResourceData.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResourceData.cs deleted file mode 100644 index ec3bf389d8e5..000000000000 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/WorkspaceConnectionPropertiesV2BasicResourceData.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; -using Azure.ResourceManager.MachineLearning.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.MachineLearning -{ - /// A class representing the WorkspaceConnectionPropertiesV2BasicResource data model. - public partial class WorkspaceConnectionPropertiesV2BasicResourceData : ResourceData - { - /// Initializes a new instance of WorkspaceConnectionPropertiesV2BasicResourceData. - /// - /// Please note is the base class. According to the scenario, a derived class 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 WorkspaceConnectionPropertiesV2BasicResourceData(WorkspaceConnectionPropertiesV2 properties) - { - Argument.AssertNotNull(properties, nameof(properties)); - - Properties = properties; - } - - /// Initializes a new instance of WorkspaceConnectionPropertiesV2BasicResourceData. - /// 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 . - /// - internal WorkspaceConnectionPropertiesV2BasicResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, WorkspaceConnectionPropertiesV2 properties) : base(id, name, resourceType, systemData) - { - Properties = properties; - } - - /// - /// 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 WorkspaceConnectionPropertiesV2 Properties { get; set; } - } -} diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md index 748f8657b764..2ac215787f25 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/autorest.md @@ -15,6 +15,9 @@ skip-csproj: true modelerfour: flatten-payloads: false +mgmt-debug: + show-serialized-names: true + format-by-name-rules: 'tenantId': 'uuid' 'etag': 'etag' @@ -46,11 +49,343 @@ rename-rules: Etag: ETag|etag AKS: Aks USD: Usd + PAT: Pat + SAS: Sas + LRS: Lrs + +override-operation-name: + Quotas_List: GetMachineLearningQuotas + Quotas_Update: UpdateMachineLearningQuotas + Usages_List: GetMachineLearningUsages + VirtualMachineSizes_List: GetMachineLearningVmSizes no-property-type-replacement: - ResourceId - VirtualMachineImage +rename-mapping: + ComputeInstanceProperties.setupScripts: SetupScriptsSettings + Workspace: MachineLearningWorkspace + ComputeResource: MachineLearningCompute + Compute: MachineLearningComputeProperties + Compute.resourceId: -|arm-id + ComputeInstance: MachineLearningComputeInstance + ComputeInstanceProperties: MachineLearningComputeInstanceProperties + AKS: MachineLearningAksCompute + AKSSchemaProperties: MachineLearningAksComputeProperties + Kubernetes: MachineLearningKubernetesCompute + KubernetesProperties: MachineLearningKubernetesProperties + VirtualMachine: MachineLearningVirtualMachineCompute + VirtualMachineSchemaProperties: MachineLearningVirtualMachineProperties + HDInsight: MachineLearningHDInsightCompute + HDInsightProperties: MachineLearningHDInsightProperties + DataFactory: MachineLearningDataFactoryCompute + Databricks: MachineLearningDatabricksCompute + DatabricksProperties: MachineLearningDatabricksProperties + DataLakeAnalytics: MachineLearningDataLakeAnalytics + DataLakeAnalyticsSchemaProperties: MachineLearningDataLakeAnalyticsProperties + SynapseSpark: MachineLearningSynapseSpark + SynapseSparkProperties: MachineLearningSynapseSparkProperties + ProvisioningState: MachineLearningProvisioningState + ListWorkspaceKeysResult: MachineLearningWorkspaceGetKeysResult + RegistryListCredentialsResult: MachineLearningContainerRegistryCredentials + Password: MachineLearningPasswordDetail + BatchDeploymentTrackedResource: MachineLearningBatchDeployment + BatchDeployment: MachineLearningBatchDeploymentProperties + BatchEndpointTrackedResource: MachineLearningBatchEndpoint + BatchEndpoint: MachineLearningBatchEndpointProperties + AssetContainer: MachineLearningAssetContainer + ResourceBase: MachineLearningResourceBase + AssetBase: MachineLearningAssetBase + JobBaseResource: MachineLearningJob + JobBase: MachineLearningJobProperties + CommandJob: MachineLearningCommandJob + CodeContainerResource: MachineLearningCodeContainer + CodeContainer: MachineLearningCodeContainerProperties + CodeVersionResource: MachineLearningCodeVersion + CodeVersion: MachineLearningCodeVersionProperties + ComponentContainerResource: MachineLearningComponentContainer + ComponentContainer: MachineLearningComponentContainerProperties + DataVersionBaseResource: MachineLearningDataVersion + DataVersionBase: MachineLearningDataVersionProperties + EnvironmentContainerResource: MachineLearningEnvironmentContainer + EnvironmentContainer: MachineLearningEnvironmentContainerProperties + EnvironmentVersionResource: MachineLearningEnvironmentVersion + EnvironmentVersion: MachineLearningEnvironmentVersionProperties + ComponentVersionResource: MachineLearningComponentVersion + ComponentVersion: MachineLearningComponentVersionProperties + DataContainerResource: MachineLearningDataContainer + DataContainer: MachineLearningDataContainerProperties + DatastoreResource: MachineLearningDatastore + Datastore: MachineLearningDatastoreProperties + MLTableData: MachineLearningTable + ResourceQuota: MachineLearningResourceQuota + ModelContainerResource: MachineLearningModelContainer + ModelContainer: MachineLearningModelContainerProperties + ModelVersionResource: MachineLearningModelVersion + ModelVersion: MachineLearningModelVersionProperties + OnlineDeploymentTrackedResource: MachineLearningOnlineDeployment + OnlineDeployment: MachineLearningOnlineDeploymentProperties + OnlineEndpointTrackedResource: MachineLearningOnlineEndpoint + OnlineEndpoint: MachineLearningOnlineEndpointProperties + Schedule: MachineLearningSchedule + ScheduleProperties: MachineLearningScheduleProperties + VirtualMachineSize: MachineLearningVmSize + WorkspaceConnectionPropertiesV2BasicResource: MachineLearningWorkspaceConnection + WorkspaceConnectionPropertiesV2: MachineLearningWorkspaceConnectionProperties + UpdateWorkspaceQuotas: MachineLearningWorkspaceQuotaUpdate + QuotaUpdateParameters: MachineLearningQuotaUpdateContent + EncryptionProperty: MachineLearningEncryptionSetting + EncryptionStatus: MachineLearningEncryptionStatus + EncryptionKeyVaultProperties: MachineLearningEncryptionKeyVaultProperties + EncryptionKeyVaultProperties.keyVaultArmId: -|arm-id + IdentityForCmk: MachineLearningCmkIdentity + IdentityForCmk.userAssignedIdentity: -|arm-id + NotebookResourceInfo: MachineLearningNotebookResourceInfo + PublicNetworkAccess: MachineLearningPublicNetworkAccess + SharedPrivateLinkResource: MachineLearningSharedPrivateLinkResource + SharedPrivateLinkResource.properties.privateLinkResourceId: -|arm-id + Workspace.properties.storageHnsEnabled: IsStorageHnsEnabled + Workspace.properties.v1LegacyMode: IsV1LegacyMode + DiagnoseResponseResult: MachineLearningWorkspaceDiagnoseResult + DiagnoseWorkspaceParameters: MachineLearningWorkspaceDiagnoseContent + DiagnoseRequestProperties: MachineLearningWorkspaceDiagnoseProperties + NotebookAccessTokenResult: MachineLearningWorkspaceNotebookAccessTokenResult + ListNotebookKeysResult: MachineLearningWorkspaceGetNotebookKeysResult + FqdnEndpoints: MachineLearningFqdnEndpoints + FqdnEndpointsProperties: MachineLearningFqdnEndpointsProperties + ListStorageAccountKeysResult: MachineLearningWorkspaceGetStorageAccountKeysResult + AmlUserFeature: MachineLearningUserFeature + DatastoreCredentials: MachineLearningDatastoreCredentials + AccountKeyDatastoreCredentials: MachineLearningAccountKeyDatastoreCredentials + CertificateDatastoreCredentials: MachineLearningCertificateDatastoreCredentials + NoneDatastoreCredentials: MachineLearningNoneDatastoreCredentials + SasDatastoreCredentials: MachineLearningSasDatastoreCredentials + ServicePrincipalDatastoreCredentials: MachineLearningServicePrincipalDatastoreCredentials + DatastoreSecrets: MachineLearningDatastoreSecrets + CertificateDatastoreSecrets: MachineLearningCertificateDatastoreSecrets + SasDatastoreSecrets: MachineLearningSasDatastoreSecrets + ServicePrincipalDatastoreSecrets: MachineLearningServicePrincipalDatastoreSecrets + AccountKeyDatastoreSecrets: MachineLearningAccountKeyDatastoreSecrets + ComputeSecrets: MachineLearningComputeSecrets + AksComputeSecrets: MachineLearningAksComputeSecrets + DatabricksComputeSecrets: MachineLearningDatabricksComputeSecrets + VirtualMachineSecrets: MachineLearningVirtualMachineSecrets + AksNetworkingConfiguration: MachineLearningAksNetworkingConfiguration + AksNetworkingConfiguration.subnetId: -|arm-id + ClusterPurpose: MachineLearningClusterPurpose + LoadBalancerType: MachineLearningLoadBalancerType + SslConfiguration: MachineLearningSslConfiguration + SystemService: MachineLearningComputeSystemService + AllocationState: AmlAllocationState + IdentityConfiguration: MachineLearningIdentityConfiguration + ManagedIdentity: MachineLearningManagedIdentity + ManagedIdentity.resourceId: -|arm-id + UserIdentity: MachineLearningUserIdentity + PartialMinimalTrackedResource: MachineLearningResourcePatch + PartialMinimalTrackedResourceWithIdentity: MachineLearningResourcePatchWithIdentity + PartialSku: MachineLearningSkuPatch + ApplicationSharingPolicy: MachineLearningApplicationSharingPolicy + AssetReferenceBase: MachineLearningAssetReferenceBase + DataPathAssetReference: MachineLearningDataPathAssetReference + IdAssetReference: MachineLearningIdAssetReference + IdAssetReference.assetId: -|arm-id + OutputPathAssetReference: MachineLearningOutputPathAssetReference + AssignedUser: MachineLearningComputeInstanceAssignedUser + AutoPauseProperties: MachineLearningAutoPauseProperties + AutoPauseProperties.enabled: IsEnabled + Autosave: MachineLearningComputeInstanceAutosave + ComputeInstanceConnectivityEndpoints: MachineLearningComputeInstanceConnectivityEndpoints + ComputeInstanceContainer: MachineLearningComputeInstanceContainer + ComputeInstanceEnvironmentInfo: MachineLearningComputeInstanceEnvironmentInfo + Network: MachineLearningNetwork + ComputeInstanceCreatedBy: MachineLearningComputeInstanceCreatedBy + ComputeInstanceAuthorizationType: MachineLearningComputeInstanceAuthorizationType + ComputeInstanceApplication: MachineLearningComputeInstanceApplication + ComputeInstanceDataDisk: MachineLearningComputeInstanceDataDisk + ComputeInstanceDataMount: MachineLearningComputeInstanceDataMount + MountAction: MachineLearningMountAction + MountState: MachineLearningMountState + SourceType: MachineLearningSourceType + ComputeInstanceLastOperation: MachineLearningComputeInstanceLastOperation + OperationName: MachineLearningOperationName + OperationStatus: MachineLearningOperationStatus + OperationTrigger: MachineLearningOperationTrigger + ComputeInstanceSshSettings: MachineLearningComputeInstanceSshSettings + SshPublicAccess: MachineLearningSshPublicAccess + ComputeInstanceState: MachineLearningComputeInstanceState + ComputePowerAction: MachineLearningComputePowerAction + ComputeStartStopSchedule: MachineLearningComputeStartStopSchedule + ProvisioningStatus: MachineLearningComputeProvisioningStatus + ScheduleBase: MachineLearningScheduleBase + ScheduleStatus: MachineLearningScheduleStatus + TriggerType: MachineLearningTriggerType + RecurrenceTrigger: MachineLearningRecurrenceTrigger + ConnectionCategory: MachineLearningConnectionCategory + ContainerType: MachineLearningContainerType + DeploymentLogs: MachineLearningDeploymentLogs + DeploymentLogsRequest: MachineLearningDeploymentLogsContent + DiagnoseResponseResultValue: MachineLearningDiagnoseResultValue + DiagnoseResult: MachineLearningDiagnoseResult + DiagnoseResultLevel: MachineLearningDiagnoseResultLevel + PartialManagedServiceIdentity: MachineLearningPartialManagedServiceIdentity + AutoScaleProperties: MachineLearningAutoScaleProperties + AutoScaleProperties.enabled: IsEnabled + Seasonality: ForecastingSeasonality + AzureBlobDatastore: MachineLearningAzureBlobDatastore + AzureDataLakeGen1Datastore: MachineLearningAzureDataLakeGen1Datastore + AzureDataLakeGen2Datastore: MachineLearningAzureDataLakeGen2Datastore + AzureFileDatastore: MachineLearningAzureFileDatastore + BatchLoggingLevel: MachineLearningBatchLoggingLevel + BatchOutputAction: MachineLearningBatchOutputAction + BatchRetrySettings: MachineLearningBatchRetrySettings + BillingCurrency: MachineLearningBillingCurrency + BuildContext: MachineLearningBuildContext + EnvironmentType: MachineLearningEnvironmentType + OperatingSystemType: MachineLearningOperatingSystemType + InferenceContainerProperties: MachineLearningInferenceContainerProperties + Caching: MachineLearningCachingType + Classification: ClassificationTask + CodeConfiguration: MachineLearningCodeConfiguration + JobLimits: MachineLearningJobLimits + SweepJobLimits: MachineLearningSweepJobLimits + CommandJobLimits: MachineLearningCommandJobLimits + ContainerResourceRequirements: MachineLearningContainerResourceRequirements + ContainerResourceSettings: MachineLearningContainerResourceSettings + TriggerBase: MachineLearningTriggerBase + JobInput: MachineLearningJobInput + CustomModelJobInput: MachineLearningCustomModelJobInput + LiteralJobInput: MachineLearningLiteralJobInput + MLFlowModelJobInput: MachineLearningFlowModelJobInput + MLTableJobInput: MachineLearningTableJobInput + TritonModelJobInput: MachineLearningTritonModelJobInput + UriFileJobInput: MachineLearningUriFileJobInput + UriFolderJobInput: MachineLearningUriFolderJobInput + JobOutput: MachineLearningJobOutput + CustomModelJobOutput: MachineLearningCustomModelJobOutput + MLFlowModelJobOutput: MachineLearningFlowModelJobOutput + MLTableJobOutput: MachineLearningTableJobOutput + TritonModelJobOutput: MachineLearningTritonModelJobOutput + UriFileJobOutput: MachineLearningUriFileJobOutput + UriFolderJobOutput: MachineLearningUriFolderJobOutput + DataType: MachineLearningDataType + OnlineScaleSettings: MachineLearningOnlineScaleSettings + DefaultScaleSettings: MachineLearningDefaultScaleSettings + TargetUtilizationScaleSettings: MachineLearningTargetUtilizationScaleSettings + DeploymentProvisioningState: MachineLearningDeploymentProvisioningState + ResourceConfiguration: MachineLearningResourceConfiguration + DeploymentResourceConfiguration: MachineLearningDeploymentResourceConfiguration + JobResourceConfiguration: MachineLearningJobResourceConfiguration + DistributionConfiguration: MachineLearningDistributionConfiguration + Mpi: MpiDistributionConfiguration + PyTorch: PyTorchDistributionConfiguration + TensorFlow: TensorFlowDistributionConfiguration + EarlyTerminationPolicy: MachineLearningEarlyTerminationPolicy + EgressPublicNetworkAccessType: MachineLearningEgressPublicNetworkAccessType + EndpointAuthKeys: MachineLearningEndpointAuthKeys + EndpointAuthMode: MachineLearningEndpointAuthMode + EndpointAuthToken: MachineLearningEndpointAuthToken + EndpointComputeType: MachineLearningEndpointComputeType + EndpointDeploymentPropertiesBase: MachineLearningEndpointDeploymentProperties + EndpointPropertiesBase: MachineLearningEndpointProperties + EndpointProvisioningState: MachineLearningEndpointProvisioningState + EndpointScheduleAction: MachineLearningEndpointScheduleAction + ErrorResponse: MachineLearningError + EstimatedVMPrice: MachineLearningEstimatedVMPrice + VMPriceOSType: MachineLearningVMPriceOSType + VMTier: MachineLearningVmTier + EstimatedVMPrices: MachineLearningEstimatedVMPrices + UnitOfMeasure: MachineLearningUnitOfMeasure + FeatureLags: MachineLearningFeatureLag + FeaturizationMode: MachineLearningFeaturizationMode + FeaturizationSettings: MachineLearningFeaturizationSettings + FlavorData: MachineLearningFlavorData + FqdnEndpoint: MachineLearningFqdnEndpoint + FqdnEndpointDetail: MachineLearningFqdnEndpointDetail + Goal: MachineLearningGoal + InputDeliveryMode: MachineLearningInputDeliveryMode + OutputDeliveryMode: MachineLearningOutputDeliveryMode + InstanceTypeSchema: MachineLearningInstanceTypeSchema + InstanceTypeSchemaResources: MachineLearningInstanceTypeSchemaResources + ScheduleActionBase: MachineLearningScheduleAction + JobScheduleAction: MachineLearningJobScheduleAction + JobService: MachineLearningJobService + JobStatus: MachineLearningJobStatus + KeyType: MachineLearningKeyType + KubernetesOnlineDeployment: MachineLearningKubernetesOnlineDeployment + ListViewType: MachineLearningListViewType + LogVerbosity: MachineLearningLogVerbosity + ManagedIdentityAuthTypeWorkspaceConnectionProperties: MachineLearningManagedIdentityAuthTypeWorkspaceConnection + WorkspaceConnectionManagedIdentity: MachineLearningWorkspaceConnectionManagedIdentity + WorkspaceConnectionManagedIdentity.resourceId: -|arm-id + NoneAuthTypeWorkspaceConnectionProperties: MachineLearningNoneAuthTypeWorkspaceConnection + PATAuthTypeWorkspaceConnectionProperties: MachineLearningPATAuthTypeWorkspaceConnection + SASAuthTypeWorkspaceConnectionProperties: MachineLearningSASAuthTypeWorkspaceConnection + UsernamePasswordAuthTypeWorkspaceConnectionProperties: MachineLearningUsernamePasswordAuthTypeWorkspaceConnection + ConnectionAuthType: MachineLearningConnectionAuthType + ManagedOnlineDeployment: MachineLearningManagedOnlineDeployment + ModelSize: MachineLearningModelSize + NodeState: MachineLearningNodeState + NodeStateCounts: MachineLearningNodeStateCounts + NotebookPreparationError: MachineLearningNotebookPreparationError + Objective: MachineLearningObjective + OnlineRequestSettings: MachineLearningOnlineRequestSettings + OrderString: MachineLearningOrderString + OsType: MachineLearningOSType + PipelineJob: MachineLearningPipelineJob + PrivateEndpoint: MachineLearningPrivateEndpoint + PrivateEndpoint.id: -|arm-id + PrivateEndpoint.subnetArmId: -|arm-id + ProbeSettings: MachineLearningProbeSettings + PublicNetworkAccessType: MachineLearningPublicNetworkAccessType + QuotaBaseProperties: MachineLearningQuotaProperties + QuotaUnit: MachineLearningQuotaUnit + RecurrenceFrequency: MachineLearningRecurrenceFrequency + RecurrenceSchedule: MachineLearningRecurrenceSchedule + WeekDay: MachineLearningWeekday + RegenerateEndpointKeysRequest: MachineLearningEndpointKeyRegenerateContent + Regression: AutoMLVerticalRegression + RegressionModels: AutoMLVerticalRegressionModel + RegressionPrimaryMetrics: AutoMLVerticalRegressionPrimaryMetric + RemoteLoginPortPublicAccess: MachineLearningRemoteLoginPortPublicAccess + ResourceName: MachineLearningResourceName + Route: MachineLearningInferenceContainerRoute + ScaleSettings: AmlComputeScaleSettings + ScheduleListViewType: MachineLearningScheduleListViewType + ScheduleProvisioningState: MachineLearningScheduleProvisioningState + ScheduleProvisioningStatus: MachineLearningScheduleProvisioningStatus + ScriptReference: MachineLearningScriptReference + ScriptsToExecute: MachineLearningScriptsToExecute + ServiceDataAccessAuthIdentity: MachineLearningServiceDataAccessAuthIdentity + ShortSeriesHandlingConfiguration: MachineLearningShortSeriesHandlingConfiguration + SkuCapacity: MachineLearningSkuCapacity + SkuScaleType: MachineLearningSkuScaleType + SkuResource: MachineLearningSkuDetail + SkuSetting: MachineLearningSkuSetting + SslConfigStatus: MachineLearningSslConfigStatus + StackEnsembleSettings: MachineLearningStackEnsembleSettings + StackMetaLearnerType: MachineLearningStackMetaLearnerType + Status: MachineLearningWorkspaceQuotaStatus + StorageAccountType: MachineLearningStorageAccountType + SweepJob: MachineLearningSweepJob + TrainingSettings: MachineLearningTrainingSettings + TrainingSettings.enableDnnTraining: IsDnnTrainingEnabled + TrainingSettings.enableModelExplainability: IsModelExplainabilityEnabled + TrainingSettings.enableOnnxCompatibleModels: IsOnnxCompatibleModelsEnabled + TrainingSettings.enableStackEnsemble: IsStackEnsembleEnabled + TrainingSettings.enableVoteEnsemble: IsVoteEnsembleEnabled + UnderlyingResourceAction: MachineLearningUnderlyingResourceAction + UriFileDataVersion: MachineLearningUriFileDataVersion + UriFolderDataVersion: MachineLearningUriFolderDataVersion + UsageName: MachineLearningUsageName + UsageUnit: MachineLearningUsageUnit + UserAccountCredentials: MachineLearningUserAccountCredentials + UseStl: MachineLearningUseStl + ValueFormat: MachineLearningValueFormat + VirtualMachineSshCredentials: MachineLearningVmSshCredentials + VmPriority: MachineLearningVmPriority + WorkspaceConnectionUsernamePassword: MachineLearningWorkspaceConnectionUsernamePassword + directive: - from: swagger-document where: $.definitions.ComputeNodesInformation.properties @@ -96,12 +431,6 @@ directive: - from: swagger-document where: $.definitions.ComputeInstance.allOf[?(@.type=="object")].properties.properties.properties.setupScripts transform: $["x-nullable"] = true; - - from: swagger-document - where: $.definitions.DataSettings.properties.trainingData - transform: $["x-ms-client-name"] = "trainingDataSettings"; - - from: swagger-document - where: $.definitions.ComputeInstanceProperties.properties.setupScripts - transform: $["x-ms-client-name"] = "setupScriptsSettings"; - from: swagger-document where: $.definitions.AmlComputeProperties.properties.errors transform: $["x-nullable"] = true; @@ -111,54 +440,40 @@ directive: - from: swagger-document where: $.definitions.TableVerticalValidationDataSettings.properties.cvSplitColumnNames transform: $["x-nullable"] = true; - - from: machineLearningServices.json - where: $.definitions - transform: > - $.Workspace["x-ms-client-name"] = "MachineLearningWorkspace"; - $.ComputeResource["x-ms-client-name"] = "MachineLearningCompute"; - $.Compute.properties.resourceId["x-ms-format"] = "arm-id"; - $.AKS["x-ms-client-name"] = "AksCompute"; - $.Kubernetes["x-ms-client-name"] = "KubernetesCompute"; - $.VirtualMachine["x-ms-client-name"] = "VirtualMachineCompute"; - $.HDInsight["x-ms-client-name"] = "HDInsightCompute"; - $.DataFactory["x-ms-client-name"] = "DataFactoryCompute"; - $.Databricks["x-ms-client-name"] = "DatabricksCompute"; - $.DataLakeAnalytics["x-ms-client-name"] = "DataLakeAnalyticsCompute"; - $.SynapseSpark["x-ms-client-name"] = "SynapseSparkCompute"; - $.Password["x-ms-client-name"] = "PasswordDetail"; + # quite a few x-ms-client-name extensions are defined in the swagger, we here erase them all to prevent some funny interaction between our own renaming configuration - from: mfe.json where: $.definitions transform: > - $.CodeContainerResource["x-ms-client-name"] = "CodeContainer"; - $.CodeContainer["x-ms-client-name"] = "CodeContainerProperties"; - $.BatchDeploymentTrackedResource["x-ms-client-name"] = "BatchDeployment"; - $.BatchDeployment["x-ms-client-name"] = "BatchDeploymentProperties"; - $.BatchEndpointTrackedResource["x-ms-client-name"] = "BatchEndpoint"; - $.BatchEndpoint["x-ms-client-name"] = "BatchEndpointProperties"; - $.CodeVersionResource["x-ms-client-name"] = "CodeVersion"; - $.CodeVersion["x-ms-client-name"] = "CodeVersionProperties"; - $.ComponentContainerResource["x-ms-client-name"] = "ComponentContainer"; - $.ComponentContainer["x-ms-client-name"] = "ComponentContainerProperties"; - $.ComponentVersionResource["x-ms-client-name"] = "ComponentVersion"; - $.ComponentVersion["x-ms-client-name"] = "ComponentVersionProperties"; - $.DataContainerResource["x-ms-client-name"] = "DataContainer"; - $.DataContainer["x-ms-client-name"] = "DataContainerProperties"; - $.DatastoreResource["x-ms-client-name"] = "Datastore"; - $.Datastore["x-ms-client-name"] = "DatastoreProperties"; - $.DataVersionBaseResource["x-ms-client-name"] = "DataVersion"; - $.DataVersionBase["x-ms-client-name"] = "DataVersionProperties"; - $.EnvironmentContainerResource["x-ms-client-name"] = "EnvironmentContainer"; - $.EnvironmentContainer["x-ms-client-name"] = "EnvironmentContainerProperties"; - $.EnvironmentVersionResource["x-ms-client-name"] = "EnvironmentVersion"; - $.EnvironmentVersion["x-ms-client-name"] = "EnvironmentVersionProperties"; - $.JobBaseResource["x-ms-client-name"] = "MachineLearningJob"; - $.JobBase["x-ms-client-name"] = "MachineLearningJobProperties"; - $.ModelContainerResource["x-ms-client-name"] = "ModelContainer"; - $.ModelContainer["x-ms-client-name"] = "ModelContainerProperties"; - $.ModelVersionResource["x-ms-client-name"] = "ModelVersion"; - $.ModelVersion["x-ms-client-name"] = "ModelVersionProperties"; - $.OnlineDeploymentTrackedResource["x-ms-client-name"] = "OnlineDeployment"; - $.OnlineDeployment["x-ms-client-name"] = "OnlineDeploymentProperties"; - $.OnlineEndpointTrackedResource["x-ms-client-name"] = "OnlineEndpoint"; - $.OnlineEndpoint["x-ms-client-name"] = "OnlineEndpointProperties"; + $.CodeContainerResource["x-ms-client-name"] = undefined; + $.CodeContainer["x-ms-client-name"] = undefined; + $.BatchDeploymentTrackedResource["x-ms-client-name"] = undefined; + $.BatchDeployment["x-ms-client-name"] = undefined; + $.BatchEndpointTrackedResource["x-ms-client-name"] = undefined; + $.BatchEndpoint["x-ms-client-name"] = undefined; + $.CodeVersionResource["x-ms-client-name"] = undefined; + $.CodeVersion["x-ms-client-name"] = undefined; + $.ComponentContainerResource["x-ms-client-name"] = undefined; + $.ComponentContainer["x-ms-client-name"] = undefined; + $.ComponentVersionResource["x-ms-client-name"] = undefined; + $.ComponentVersion["x-ms-client-name"] = undefined; + $.DataContainerResource["x-ms-client-name"] = undefined; + $.DataContainer["x-ms-client-name"] = undefined; + $.DatastoreResource["x-ms-client-name"] = undefined; + $.Datastore["x-ms-client-name"] = undefined; + $.DataVersionBaseResource["x-ms-client-name"] = undefined; + $.DataVersionBase["x-ms-client-name"] = undefined; + $.EnvironmentContainerResource["x-ms-client-name"] = undefined; + $.EnvironmentContainer["x-ms-client-name"] = undefined; + $.EnvironmentVersionResource["x-ms-client-name"] = undefined; + $.EnvironmentVersion["x-ms-client-name"] = undefined; + $.JobBaseResource["x-ms-client-name"] = undefined; + $.JobBase["x-ms-client-name"] = undefined; + $.ModelContainerResource["x-ms-client-name"] = undefined; + $.ModelContainer["x-ms-client-name"] = undefined; + $.ModelVersionResource["x-ms-client-name"] = undefined; + $.ModelVersion["x-ms-client-name"] = undefined; + $.OnlineDeploymentTrackedResource["x-ms-client-name"] = undefined; + $.OnlineDeployment["x-ms-client-name"] = undefined; + $.OnlineEndpointTrackedResource["x-ms-client-name"] = undefined; + $.OnlineEndpoint["x-ms-client-name"] = undefined; ``` diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/tests/Scenario/MachineLearningComputeOperationTests.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/tests/Scenario/MachineLearningComputeOperationTests.cs index f120402dd151..68d51d5ed656 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/tests/Scenario/MachineLearningComputeOperationTests.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/tests/Scenario/MachineLearningComputeOperationTests.cs @@ -74,7 +74,7 @@ private async Task CreateMachineLearningComputeA var mlComputeData = new MachineLearningComputeData(DefaultLocation); mlComputeData.Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned); var vm = await CreateVmAsync(resourceGroup); - mlComputeData.Properties = new ComputeInstance(); + mlComputeData.Properties = new MachineLearningComputeInstance(); mlComputeData.Properties.ComputeType = ComputeType.VirtualMachine; mlComputeData.Properties.ResourceId = vm.Id; return (await mlWorkspace.GetMachineLearningComputes().CreateOrUpdateAsync(WaitUntil.Completed, mlComputeName, mlComputeData)).Value;